aboutsummaryrefslogtreecommitdiff
path: root/dotter
diff options
context:
space:
mode:
authorNPScript <nathan@reinerweb.ch>2022-08-22 22:03:04 +0200
committerNPScript <nathan@reinerweb.ch>2022-08-22 22:03:04 +0200
commit6d6e9b536ad5152e3a2522db7232c4568621897a (patch)
treebe80f2107646eebed2be14e4a39f85dc06decd01 /dotter
parent1eddc2f0a2f5f99f558e735e4a48aa75f295617a (diff)
new changes
Diffstat (limited to 'dotter')
-rwxr-xr-xdotter18
1 files changed, 18 insertions, 0 deletions
diff --git a/dotter b/dotter
new file mode 100755
index 0000000..8117083
--- /dev/null
+++ b/dotter
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+CONFIG=$(find .config -type f)
+LOCAL=$(find .local -type f)
+ZSH_ENV=.zshenv;
+PROFILE=.profile;
+
+for f in $CONFIG $LOCAL $ZSH_ENV $PROFILE; do
+
+ test "$f" -nt "$HOME/$f" && echo "updating $f"
+ test "$f" -ot "$HOME/$f" && echo "fetching $f"
+ test ! -e "$HOME/$f" && echo "installing $f"
+
+ test ! -e "$(dirname "$HOME/$f")" && mkdir -p "$(dirname "$HOME/$f")"
+
+ cp -u "$f" "$HOME/$f"
+ cp -u "$HOME/$f" "$f"
+done