aboutsummaryrefslogtreecommitdiff
path: root/dotter
blob: 81170838927c894216fe301a3a5d69ffe492bab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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