aboutsummaryrefslogtreecommitdiff
path: root/dotter
blob: 0cd78cdde18794ecb7797459aa49e8011e9658ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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" && cp -u "$f" "$HOME/$f"
	test "$f" -ot "$HOME/$f" && echo "fetching $f" && cp -u "$HOME/$f" "$f"
	test ! -e "$HOME/$f" && echo "installing $f" && cp -u "$f" "$HOME/$f"

	test ! -e "$(dirname "$HOME/$f")" && mkdir -p "$(dirname "$HOME/$f")"
done