Skip to content

Instantly share code, notes, and snippets.

@pibby
Created February 18, 2014 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pibby/9063109 to your computer and use it in GitHub Desktop.
Save pibby/9063109 to your computer and use it in GitHub Desktop.
Dotfiles backup on Linux
#!/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