]> apps.delaporte.us Git - dotfiles.git/commitdiff
Add dot apply command
authorEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 03:50:22 +0000 (22:50 -0500)
committerEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 03:50:22 +0000 (22:50 -0500)
bin/dot

diff --git a/bin/dot b/bin/dot
index 45a7a393824a3186bb40c3216a71ebf0806e0fe9..06d0db4640ad8c658f1d5c50850a6261aaf021ce 100755 (executable)
--- a/bin/dot
+++ b/bin/dot
@@ -85,7 +85,7 @@ if [ "$1" == "link" ]; then
 
 read -d '' LINK_THIS_FILE << EOF
 
 
 read -d '' LINK_THIS_FILE << EOF
 
-    - name: Create a symbolic link
+    - name: symlink $2
       ansible.builtin.file:
         src: "$LINKFILES/$2"
         dest: "$HOME/.$2"
       ansible.builtin.file:
         src: "$LINKFILES/$2"
         dest: "$HOME/.$2"
@@ -94,6 +94,16 @@ EOF
 
        echo "    $LINK_THIS_FILE" >> $TASKFILE
        echo "$2 added to symlinks in $TASKFILE"
 
        echo "    $LINK_THIS_FILE" >> $TASKFILE
        echo "$2 added to symlinks in $TASKFILE"
-       echo "Run `dot apply` to create all configured symlinks"
+       echo "Run 'dot apply' to create all configured symlinks"
 fi
 
 fi
 
+
+if [ "$1" == "apply" ]; then
+  if [[ ! -f "$TASKFILE" ]]; then
+               echo "$TASKFILE is missing. Run 'dot setup'"
+               exit 1
+       fi
+       $ANSIBLE $TASKFILE
+fi
+
+