aboutsummaryrefslogtreecommitdiff
path: root/hooks/housekeeping.hook
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/housekeeping.hook')
-rwxr-xr-xhooks/housekeeping.hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/hooks/housekeeping.hook b/hooks/housekeeping.hook
new file mode 100755
index 0000000..7fc77a9
--- /dev/null
+++ b/hooks/housekeeping.hook
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+git submodule init
+git submodule update
+
+#.files is used to tell scripts where to look for the dotfiles
+[ -f "$HOME/.files" ] && source "$HOME/.files"
+if [ "$DOTFILEBASE" != "$(pwd)" ] && yes_no "'.files' out of date. Regenerate?"; then
+ echo "DOTFILEBASE=\"$(pwd)\"" > $HOME/.files
+fi
+
+if [ ! -f "$HOME/.files.config" ] && yes_no ".files.config does not exist. Populate with defaults?"; then
+ cp "config.default" "$HOME/.files.config"
+fi