]> apps.delaporte.us Git - dotfiles.git/commitdiff
Add support for linking files with . already in the name
authorEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 12:27:18 +0000 (07:27 -0500)
committerEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 12:27:18 +0000 (07:27 -0500)
bin/dot

diff --git a/bin/dot b/bin/dot
index 6173ee1144d349c09dd1c0650573af4b1f83c1eb..a08b732ddf7402cf0e7f177a6237a83f73366332 100755 (executable)
--- a/bin/dot
+++ b/bin/dot
@@ -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"