blob: 516c407e69ac4dbf4395b0c8d50d6e8bd2cfc25e (
plain) (
tree)
|
|
#!/usr/bin/env sh
SYMLINKDIR=$(readlink -f "$0")
BASEDIR=$(dirname "$SYMLINKDIR")
cd $BASEDIR
function doIt() {
git submodule update --init --recursive
rsync --exclude ".git/" \
--exclude ".DS_Store" \
--exclude ".osx" \
--exclude "bootstrap.sh" \
--exclude "README.md" \
--exclude "LICENSE.md" \
--exclude ".gitconfig" \
--exclude ".gitignore" \
--exclude ".gitmodules" \
--exclude "dwm" \
-avh --no-perms ./ ~/
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt;
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
doIt;
fi;
fi;
unset doIt;
|