diff options
Diffstat (limited to 'dotter')
| -rwxr-xr-x | dotter | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |