Mercurial > index.cgi > dotfiles
changeset 113:56c2ff1a8427
mc-backup function
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Thu, 03 Jul 2014 22:49:34 -0400 |
parents | 8ebac40a40be |
children | 7aa81ab43a83 |
files | .bash_aliases |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.bash_aliases Thu May 22 10:10:53 2014 -0400 +++ b/.bash_aliases Thu Jul 03 22:49:34 2014 -0400 @@ -157,6 +157,14 @@ # Other Functions +mc-backup() { + pushd ~/Dropbox/Saves/minecraft/saves; + if [ -d $1 ]; then + tar cvf - $1 | bzip2 > ../$1_`date +%Y%m%d%H%M%S`.tar.bz2; + fi; + popd +} + tock() { while true ; do if [ `date +%S` -gt 42 ] ; then