Skip to content

Instantly share code, notes, and snippets.

@nothingrealhappen
Created June 21, 2016 04:33
Show Gist options
  • Save nothingrealhappen/ade72f7047d14f792c1ff1f22e93e7d8 to your computer and use it in GitHub Desktop.
Save nothingrealhappen/ade72f7047d14f792c1ff1f22e93e7d8 to your computer and use it in GitHub Desktop.
dotfile install script
#!/bin/bash
safe_link(){
local src="$1"
local dest="$HOME/`basename $src`"
[ ! -e "$dest" ] && ln -sf "$src" "$dest"
}
DOTFILES="/Users/x/Dropbox/dotfile/dotfiles"
for f in `ls -A $DOTFILES`; do
safe_link "$DOTFILES/$f";
done
echo 'dot file install done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment