]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
WIP dotfile manager with Ansible
authorEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 02:42:12 +0000 (21:42 -0500)
committerEdward Delaporte <edward@delaporte.us>
Mon, 6 Jul 2026 02:42:12 +0000 (21:42 -0500)
bin/dot [new file with mode: 0755]

diff --git a/bin/dot b/bin/dot
new file mode 100755 (executable)
index 0000000..a59d80d
--- /dev/null
+++ b/bin/dot
@@ -0,0 +1,50 @@
+#!/bin/bash
+# dot - a (mostly) one script dotfiles manager
+#
+# Copyright 2026 Edward Delaporte V
+# Licensed under AGPLv3 and later.
+#
+# Features
+#   symlinks - any file in $HOME/dotfiles/files may be symlinked
+#
+# dot setup
+#              install the necessary tools to $HOME/envs/dot
+#
+# dot list
+#   list available roles
+#
+# dot check
+#   check setup vs expected
+#
+# dot add ROLE
+#   add ROLE to localhost
+#
+# dot apply
+#              apply all added ROLES
+
+# set -v
+#
+if [ "$1" == "setup" ]; then
+  if [[ ! -d $HOME/envs/ansible ]]; then
+               mkdir -p "$HOME/envs"
+               echo "Setting up Ansible in ~/envs/ansible"
+               cd $HOME/envs; python3 -m venv ansible
+               $HOME/envs/ansible/bin/pip install ansible
+       fi
+  if [[ -d $HOME/envs/ansible ]]; then
+               echo "[ ok ]: ~/envs/ansible"
+       fi
+fi
+
+if [ "$1" == "check" ]; then
+  echo "check"
+fi
+
+if [ "$1" == "list" ]; then
+  echo "May symlink:"
+       cd $HOME/dotfiles/files
+       ls -p | grep -v /
+
+
+fi
+