From ee9468712fc49b9c010370365a602be58f568f94 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Sun, 5 Jul 2026 22:50:22 -0500 Subject: [PATCH] Add dot apply command --- bin/dot | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/dot b/bin/dot index 45a7a39..06d0db4 100755 --- a/bin/dot +++ b/bin/dot @@ -85,7 +85,7 @@ if [ "$1" == "link" ]; then read -d '' LINK_THIS_FILE << EOF - - name: Create a symbolic link + - name: symlink $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 "Run `dot apply` to create all configured symlinks" + echo "Run 'dot apply' to create all configured symlinks" fi + +if [ "$1" == "apply" ]; then + if [[ ! -f "$TASKFILE" ]]; then + echo "$TASKFILE is missing. Run 'dot setup'" + exit 1 + fi + $ANSIBLE $TASKFILE +fi + + -- 2.47.3