Last active
December 13, 2015 17:48
-
-
Save compleatang/4950102 to your computer and use it in GitHub Desktop.
Updated Dropbox Bootstrap Script
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
#!/usr/bin/zsh | |
#^jist /home/coda/Dropbox/bootstrap -u 4950102 | |
if [ ! -d ~/Dropbox/Dot-Files ]; then | |
mkdir Dropbox/Dot-Files/ | |
fi | |
if [ ! -d ~/Dropbox/Camera\ Uploads ]; then | |
mkdir Dropbox/Camera\ Uploads/ | |
fi | |
function file_boot { | |
if [ -f $1 ]; then | |
if [[ ! -L $1 && ! -e $2 ]]; then | |
cp $1 $2 | |
fi | |
rm $1 | |
ln -s $2 $1 | |
elif [ -e $2 ]; then | |
ln -s $2 $1 | |
fi | |
} | |
function dir_boot { | |
if [ -d $1 ]; then | |
if [[ ! -L $1 && ! -e $2 ]]; then | |
cp $1 $2 -R | |
fi | |
rm -rf $1 | |
ln -s $2 $1 | |
elif [ -e $2 ]; then | |
ln -s $2 $1 | |
fi | |
} | |
echo "First the dot files." | |
file_boot ~/.asoundrc ~/Dropbox/Dot-Files/vokoscreen-config | |
file_boot ~/.config/hub ~/Dropbox/Dot-Files/hub-config | |
file_boot ~/.config/gtk-3.0/bookmarks ~/Dropbox/Dot-Files/gtk-bookmarks | |
file_boot ~/.face ~/Dropbox/Camera\ Uploads/0000.gravatar.jpeg | |
file_boot ~/.gitconfig ~/Dropbox/Dot-Files/gitconfig | |
file_boot ~/.gitattributes ~/Dropbox/Dot-Files/gitattributes | |
file_boot ~/.gscan2pdf ~/Dropbox/Dot-Files/gscan2pdf | |
file_boot ~/.installd ~/Dropbox/Dot-Files/installd-workers | |
file_boot ~/.irbrc ~/Dropbox/Dot-Files/irbrc-workers | |
file_boot ~/.jist ~/Dropbox/Dot-Files/jist | |
file_boot ~/.npmrc ~/Dropbox/Dot-Files/npmrc-workers | |
file_boot ~/.pgadmin3 ~/Dropbox/Dot-Files/pgadmin3 | |
file_boot ~/.pgpass ~/Dropbox/Dot-Files/pgpass | |
file_boot ~/.pryrc ~/Dropbox/Dot-Files/pryrc-workers | |
file_boot ~/.rvmrc ~/Dropbox/Dot-Files/rvmrc-workers | |
file_boot ~/.trc ~/Dropbox/Dot-Files/twitter-t-gem-config | |
file_boot ~/.vimrc ~/Dropbox/Dot-Files/vimrc-workers | |
file_boot ~/.zshrc ~/Dropbox/Dot-Files/zshrc-workers | |
file_boot ~/.zsh_history ~/Dropbox/Dot-Files/zsh-history | |
echo "Then come the config directories." | |
dir_boot ~/.gnupg ~/Dropbox/GnuPG | |
dir_boot ~/.hplip ~/Dropbox/HpLip | |
dir_boot ~/.sane ~/Dropbox/Sane | |
dir_boot ~/.ssh ~/Dropbox/Ssh | |
dir_boot ~/.bin ~/Dropbox/Binary\ Files | |
echo "Thereafter we take care of the menus and desktop." | |
dir_boot ~/.config/autostart ~/Dropbox/Autostart\ -\ .config/ | |
dir_boot ~/.config/elegance-colors ~/Dropbox/Elegance\ -\ .config | |
dir_boot ~/.config/menus ~/Dropbox/Menus\ -\ .config | |
dir_boot ~/.icons ~/Dropbox/Icons | |
dir_boot ~/.local/share/applications ~/Dropbox/Menus\ -\ .local-share-applications | |
dir_boot ~/.local/share/desktop-directories ~/Dropbox/Menus\ -\ .local-share-directories | |
dir_boot ~/.local/share/gnome-shell/extensions ~/Dropbox/Gnome-shell\ -\ .local-share/ | |
dir_boot ~/.themes ~/Dropbox/Gnome-shell\ -\ .themes | |
echo "Finally come the \"other\" working directories." | |
dir_boot ~/.cheat ~/Dropbox/Cheat-Sheats | |
dir_boot ~/.config/libreoffice ~/Dropbox/Libreoffice\ -\ .config | |
dir_boot ~/.config/transmission-remote-gtk ~/Dropbox/Transmission-GTK\ -\ .config | |
dir_boot ~/.conky ~/Dropbox/Conky | |
dir_boot ~/.filezilla ~/Dropbox/Filezilla | |
dir_boot ~/.fonts ~/Dropbox/Fonts | |
dir_boot ~/.gem ~/Dropbox/Gem | |
dir_boot ~/.grsync ~/Dropbox/RSync | |
dir_boot ~/.gconf/apps/glipper ~/Dropbox/Glipper\ -\ .gconf\ -\ apps | |
dir_boot ~/.gconf/apps/guake ~/Dropbox/Guake\ -\ .gconf\ -\ apps | |
dir_boot ~/.gconf/apps/hamster-applet ~/Dropbox/Hamster\ -\ .gconf\ -\ apps | |
dir_boot ~/.gconf/apps/meld ~/Dropbox/Meld\ -\ .gconf\ -\ apps | |
dir_boot ~/.heroku ~/Dropbox/Heroku | |
dir_boot ~/.pandoc ~/Dropbox/Pandoc | |
dir_boot ~/.pry ~/Dropbox/Pry | |
dir_boot ~/.safejumper ~/Dropbox/SafeJumper | |
dir_boot ~/.zotero ~/Dropbox/zotero | |
echo "All done! Dotfiles built!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment