blob: 12247fbed04ba0d931f9c2c0058ba24c59f6b65f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/env sh
# vi: ft=sh
SYMLINKDIR="$(readlink -f "$0")"
BASEDIR="$(dirname "$SYMLINKDIR")"
cd "$BASEDIR" || exit 1
doIt() {
git submodule update --init --recursive
rsync --exclude ".git/" \
--exclude ".DS_Store" \
--exclude ".osx" \
--exclude "bootstrap.sh" \
--exclude "README.md" \
--exclude "LICENSE" \
--exclude ".gitconfig" \
--exclude ".gitignore" \
--exclude ".gitmodules" \
--exclude "dwm" \
-avh --no-perms ./ ~/
}
if [ "$1" = "--force" ] || [ "$1" = "-f" ]
then
doIt;
else
printf "This may overwrite existing files in your home directory. Are you sure? (y/n) "
read -r REPLY
echo ""
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]
then
doIt
else exit 1
fi
fi
unset doIt
|