Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 56 lines (43 sloc) 1.006 kB
# Exit with msg
function errorExit() {
echo "$1" 1>&2
exit 1
}
function copyDotFiles() {
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
--exclude "README.md" --exclude "assets/" --exclude "brew/" --exclude "shell/" -av --no-perms . ~
source ~/.zshrc
}
# Use brew to install dependecies
function brew() {
if [ "$(uname)" == "Darwin" ]; then
if !brew; then
# Install homebrew
sh brew/install.sh
fi
# Install brew packages
# Let's see if everything is allright
if brew doctor; then
brew bundle brew/Brewfile
else
error_exit "Brew didn't install correct"
fi
# Install apps with the help of cask
sh brew/cask.sh
fi
}
# Setup zsh
sh shell/init.sh
if [ "$1" == "--force" -o "$1" == "-f" ]; then
copyDotFiles
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
copyDotFiles
fi
fi
unset copyDotFiles
if [ "$1" == "--full-pull" ]; then
brew
fi
Jump to Line
Something went wrong with that request. Please try again.