summaryrefslogtreecommitdiff
path: root/dots.sh
diff options
context:
space:
mode:
authorElizabeth <lizhunt@amazon.com>2025-05-20 09:31:28 -0700
committerElizabeth <lizhunt@amazon.com>2025-05-20 09:31:28 -0700
commit4ca85fa4fb4741135d0cd4ffbfb5b487dc25b360 (patch)
treed0a5dc04dd2caebc1e231b3f47070d31279e9d57 /dots.sh
parentdf1ac6d992d0f28f4c68631221a560b0c59a8ab6 (diff)
downloaddotfiles-4ca85fa4fb4741135d0cd4ffbfb5b487dc25b360.tar.gz
dotfiles-4ca85fa4fb4741135d0cd4ffbfb5b487dc25b360.zip
Centralize management of dotfile script
Diffstat (limited to 'dots.sh')
-rwxr-xr-xdots.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dots.sh b/dots.sh
new file mode 100755
index 0000000..38b4923
--- /dev/null
+++ b/dots.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# usage: ./dots.sh [update|clean]?
+
+OP="${1:-'update'}"
+
+STOW_OP="--no-folding"
+if [ "$OP" = "clean" ]; then STOW_OP="-D"; fi
+
+find . -type d -mindepth 1 -maxdepth 1 -not -path '*/.*' \
+ | sed "s/^\.\///" \
+ | while read dir; do stow "$STOW_OP" "$dir"; done