]> apps.delaporte.us Git - dotfiles.git/blobdiff - bin/dot
Update help text
[dotfiles.git] / bin / dot
diff --git a/bin/dot b/bin/dot
index c3e4a6aa10f9fa5c7c9e3d16c529605a27dcafba..d99ef6eeef4bf1d17c0a1ef14c6dd0578627a30b 100755 (executable)
--- a/bin/dot
+++ b/bin/dot
@@ -1,17 +1,28 @@
 #!/bin/bash
 #!/bin/bash
+ENVS="$HOME/envs"
+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.
 
 dot setup
 Copyright 2026 Edward Delaporte V
 Licensed under AGPLv3 and later.
 
 dot setup
-       install the necessary tools to $HOME/envs/dot
+       install ansible CLI to $ANSIBLE
 
 dot link FILE
   updates ~/dot.HOSTNAME.yaml
   to include a symlink from ~/dotfiles/files/FILE to ~/.FILE
 
 
 dot link FILE
   updates ~/dot.HOSTNAME.yaml
   to include a symlink from ~/dotfiles/files/FILE to ~/.FILE
 
+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 check
        check setup against ~/dot.HOSTNAME.yaml
 
@@ -24,8 +35,6 @@ if [ ! -n "$1" ] || [ "$1" == "help" ]; then
 fi
 # set -v
 
 fi
 # set -v
 
-ENVS="$HOME/envs"
-ANSIBLE="$ENVS/ansible/bin/ansible-playbook"
 TASKFILE="$HOME/dot.$HOSTNAME.yaml"
 LINKFILES="$HOME/dotfiles/files"
 INSTALLS="$HOME/dotfiles/install"
 TASKFILE="$HOME/dot.$HOSTNAME.yaml"
 LINKFILES="$HOME/dotfiles/files"
 INSTALLS="$HOME/dotfiles/install"
@@ -81,7 +90,7 @@ fi
 
 if [ "$1" == "link" ]; then
        if [ ! -n "$2" ]; then
 
 if [ "$1" == "link" ]; then
        if [ ! -n "$2" ]; then
-               echo "May symlink:"
+               echo "Can symlink: (from $LINKFILES)"
                cd $LINKFILES
                ls -p | grep -v /
                exit 1
                cd $LINKFILES
                ls -p | grep -v /
                exit 1
@@ -112,9 +121,9 @@ fi
 
 if [ "$1" == "install" ]; then
        if [ ! -n "$2" ]; then
 
 if [ "$1" == "install" ]; then
        if [ ! -n "$2" ]; then
-               echo "Can install:"
+               echo "Can install: (.sh scripts in $INSTALLS)"
                cd $INSTALLS
                cd $INSTALLS
-               ls -p | grep -v /
+               ls -p | grep -v / | grep .sh
                exit 1
        fi
   if [[ ! -f "$INSTALLS/$2.sh" ]]; then
                exit 1
        fi
   if [[ ! -f "$INSTALLS/$2.sh" ]]; then