Created
February 18, 2014 01:55
-
-
Save pibby/9063109 to your computer and use it in GitHub Desktop.
Dotfiles backup on Linux
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/sh | |
## Backup dotfiles and commit to git | |
## by Katie Harron - @pibby | |
date=`date "+%Y-%m-%d %H:%M:%S"` | |
dest=~/dotfiles | |
cd ~ | |
cp -r .fluxbox/ $dest/fluxbox/ | |
cp -r .irssi/ $dest/irssi/ | |
cp -r .config/sublime-text-2/ $dest/sublime-text-2/ | |
cp .bashrc $dest/bashrc | |
cp .conkyrc $dest/conkyrc | |
cp .gtk-bookmarks $dest/gtk-bookmarks | |
echo "Done backing up current dotfiles." | |
echo "Commiting to git:" | |
cd $dest | |
git add -A | |
git commit -am "Dotfiles backup $date" | |
git push origin master | |
echo "Backup complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment