Created
April 26, 2012 15:46
-
-
Save mackuba/2500495 to your computer and use it in GitHub Desktop.
Link all dotfiles from Dropbox
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 | |
for filename in `ls /Users/psionides/Dropbox/dotfiles`; do | |
name=`basename $filename .txt` | |
echo "Linking /Users/psionides/Dropbox/dotfiles/$filename to /Users/psionides/.$name..." | |
rm -f /Users/psionides/.$name | |
ln -s /Users/psionides/Dropbox/dotfiles/$filename /Users/psionides/.$name | |
done | |
echo "Done." |
Nice, thanks. I see that there's also -F
that works with directories too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool. Oh, and you can
and you don't need
rm
before.