Last active
September 4, 2015 16:48
-
-
Save Juxtaposedwords/9694433df633bde849f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -v | |
if ( test ! $(which git); ) && [[ "$OSTYPE" =~ ^darwin ]]; then | |
# make sure we have xcode...homebrew requires | |
xcode-select --install | |
# Ask for the administrator password upfront. | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
brew update | |
brew install git | |
elif ( test ! $(which brew); ) && [ -f /etc/debian_version ]; then | |
apt-get update | |
apt-get install git -y | |
fi | |
if [ ! -d "$HOME/dotfiles/.git" ]; then | |
git clone https://github.com/juxtaposedwords/dotfiles $HOME/dotfiles | |
cd $HOME/dotfiles | |
else | |
cd $HOME/dotfiles | |
# git remote set-url origin https://github.com/Juxtaposedwords/dotfiles | |
# git reset --hard origin/master | |
fi | |
# git pull origin master | |
bash install.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment