aboutsummaryrefslogblamecommitdiff
path: root/bootstrap.sh
blob: 712757073581111b2c6d718fc4d40ec5d7030cad (plain) (tree)
1
2
3
4
5
6
7
8
                 
 

                                  

           
        
                                               





                                          


                                         

                                     

 

                                          

             








                                                                                               
 
          
 
#!/usr/bin/env sh

SYMLINKDIR="$(readlink -f "$0")"
BASEDIR="$(dirname "$SYMLINKDIR")"
cd $BASEDIR

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" ] || [ "$1" = "-f" ]
then
	doIt;
else
	printf "This may overwrite existing files in your home directory. Are you sure? (y/n) "
	read REPLY
	echo ""
	if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]
	then
		doIt
	else exit 1
	fi
fi

unset doIt