From: Edward Delaporte Date: Mon, 6 Jul 2026 03:50:22 +0000 (-0500) Subject: Add dot apply command X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/ee9468712fc49b9c010370365a602be58f568f94 Add dot apply command --- 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 + +