Created
June 21, 2016 04:33
-
-
Save nothingrealhappen/ade72f7047d14f792c1ff1f22e93e7d8 to your computer and use it in GitHub Desktop.
dotfile install script
This file contains hidden or 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 | |
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