X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/17dcdb938f427966cf8c0f0827417a98fca001d1..caf0c1c18df5f550af1ae649be1d564799c39587:/bin/dot?ds=sidebyside diff --git a/bin/dot b/bin/dot index 312dd4a..a08b732 100755 --- a/bin/dot +++ b/bin/dot @@ -38,7 +38,7 @@ fi TASKFILE="$HOME/backup/dot.$HOSTNAME.yaml" LINKFILES="$HOME/dotfiles/files" INSTALLS="$HOME/dotfiles/install" -DOT="$HOME/dot" +DOT="$HOME/.dot" read -d '' EMPTY_TASKFILE << EOF --- @@ -106,6 +106,20 @@ read -d '' LINK_THIS_FILE << EOF state: "link" EOF +if [[ "$2" == *"."* ]];then + # File already contains a dot +read -d '' LINK_THIS_FILE << EOF + + - name: symlink $2 + ansible.builtin.file: + src: "$LINKFILES/$2" + dest: "$HOME/$2" + state: "link" +EOF + + +fi + echo " $LINK_THIS_FILE" >> $TASKFILE echo "$2 added to symlinks in $TASKFILE" echo "Run 'dot apply' to create all configured symlinks"