]> apps.delaporte.us Git - dotfiles.git/commitdiff
Tighten up core help
authorEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 12:58:20 +0000 (07:58 -0500)
committerEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 12:58:20 +0000 (07:58 -0500)
bin/dot

diff --git a/bin/dot b/bin/dot
index a08b732ddf7402cf0e7f177a6237a83f73366332..aa633ec68a98515150969734c87925fabe8fb605 100755 (executable)
--- a/bin/dot
+++ b/bin/dot
@@ -4,10 +4,6 @@ ANSIBLE="$ENVS/ansible/bin/ansible-playbook"
 read -d '' HELP << EOF
 dot - a (mostly) one script dotfiles manager
 
 read -d '' HELP << EOF
 dot - a (mostly) one script dotfiles manager
 
-1. Install this file on your path
-2. Clone your (or my) 'dotfiles' repository to ~/dotfiles
-3. Run 'dot help' to get started.
-
 Copyright 2026 Edward Delaporte V
 Licensed under AGPLv3 and later.
 
 Copyright 2026 Edward Delaporte V
 Licensed under AGPLv3 and later.
 
@@ -18,22 +14,53 @@ dot link FILE
   updates ~/dot.HOSTNAME.yaml
   to include a symlink from ~/dotfiles/files/FILE to ~/.FILE
 
   updates ~/dot.HOSTNAME.yaml
   to include a symlink from ~/dotfiles/files/FILE to ~/.FILE
 
+dot check
+       check setup against ~/backup/dot.HOSTNAME.yaml
+
+dot apply
+       apply config in ~/backup/dot.HOSTNAME.yaml
+
+dot help FEATURE
+  setup - more information on setup
+  all - additional features
+EOF
+
+read -d '' SETUP_HELP << EOF
+## Setup
+
+1. Install this file on your path
+2. Clone your (or my) 'dotfiles' repository to ~/dotfiles
+3. Run 'dot help' to get started.
+
+EOF
+
+
+read -d '' EXTRA_HELP << EOF
+
 dot install SCRIPT
   updates ~/dot.HOSTNAME.yaml
   to run ~/dotfiles/SCRIPT.sh if it has not yet been run
   creates ~/dot/SCRIPT.installed after SCRIPT has been run
 
 dot install SCRIPT
   updates ~/dot.HOSTNAME.yaml
   to run ~/dotfiles/SCRIPT.sh if it has not yet been run
   creates ~/dot/SCRIPT.installed after SCRIPT has been run
 
-dot check
-       check setup against ~/dot.HOSTNAME.yaml
-
-dot apply
-       apply config in ~/dot.HOSTNAME.yaml
 EOF
 
 EOF
 
+
 if [ ! -n "$1" ] || [ "$1" == "help" ]; then
        echo "$HELP"
 fi
 if [ ! -n "$1" ] || [ "$1" == "help" ]; then
        echo "$HELP"
 fi
+if [ "$1" == "help" ] && [ "$2" == "all" ]; then
+       echo ""
+       echo "$EXTRA_HELP"
+       echo ""
+       echo "$SETUP_HELP"
+fi
+if [ "$1" == "help" ] && [ "$2" == "setup" ]; then
+       echo ""
+       echo "$SETUP_HELP"
+fi
+
 # set -v
 # set -v
+#
 
 TASKFILE="$HOME/backup/dot.$HOSTNAME.yaml"
 LINKFILES="$HOME/dotfiles/files"
 
 TASKFILE="$HOME/backup/dot.$HOSTNAME.yaml"
 LINKFILES="$HOME/dotfiles/files"