Skip to content

Instantly share code, notes, and snippets.

@doublecompile
Last active April 18, 2017 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doublecompile/a6c99bc95ab02389c09f027358327752 to your computer and use it in GitHub Desktop.
Save doublecompile/a6c99bc95ab02389c09f027358327752 to your computer and use it in GitHub Desktop.
Setup my dotfiles
#!/bin/sh
if [ -n "$(command -v yum)" ]; then
sudo yum -y install git
elif [ -n "$(command -v apt-get)" ]; then
sudo apt-get update
sudo apt-get install -y git stow
fi
pwd=$(pwd)
git clone https://github.com/doublecompile/dotfiles.git ~/dotfiles
rm ~/.bashrc
rm ~/.profile
rm ~/.bash_logout
cd dotfiles
if [ -n "$(command -v stow)" ]; then
stow bash
else
for f in $(find $HOME/dotfiles/bash -type f); do
ln -s $f $HOME/$(basename $f)
done
fi
cd $pwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment