From: mwolson_admin Date: Sat, 9 Feb 2008 05:08:41 +0000 (-0500) Subject: hcoop-backup: Tidy up some UUOC. X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/commitdiff_plain/ae0e82f01d008bb172b7ef15cdda69e21a18dcd9 hcoop-backup: Tidy up some UUOC. --- diff --git a/hcoop-backup b/hcoop-backup index 70a9e64..45007f7 100755 --- a/hcoop-backup +++ b/hcoop-backup @@ -15,8 +15,8 @@ PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin #COMPRESS_PROG=bzip2 COMPRESS_EXT=.gz COMPRESS_PROG=gzip -BWLIMIT=250 # units for BWLIMIT are KB/s +BWLIMIT=250 IFS=$'\n' @@ -39,7 +39,7 @@ function copy_over () { if test -n "$2"; then DEST=$DEST/$2 fi - cat $FILE | catsync -b $BWLIMIT $DEST/$FILE + < $FILE catsync -b $BWLIMIT $DEST/$FILE rm -f $FILE } @@ -92,8 +92,8 @@ diff allfiles debfiles | grep '^<' | cut -b 3- | \ grep -v '^/usr/share/info/dir\.old$' | \ grep -v '^/usr/share/emacs21/site-lisp/' | \ grep -v '^/usr/share/emacs22/site-lisp/' | \ - grep -v '^/usr/share/vim/addons/doc/tags$' | \ - cat > backupfiles + grep -v '^/usr/share/vim/addons/doc/tags$' \ + > backupfiles cat conffiles >> backupfiles @@ -104,6 +104,7 @@ cat backupfiles | \ grep -v ^/var/log | \ grep -v ^/usr/lib/python2.4/ | \ grep -v ^/var/lib/python-support | \ + grep -v ^/usr/share/jed/lib | \ grep -v ^/usr/share/man | \ grep -v ^/usr/share/perl5/IkiWiki/Plugin | \ grep -v ^/media | \ @@ -163,8 +164,8 @@ vos listvol deleuze | \ grep -v "\.readonly .*$" | \ sed 's_^ .*__' | \ sed 's_ .*$__' | \ - grep '[A-Za-z]' | \ - cat > volumes + grep '[A-Za-z]' \ + > volumes cat volumes | \ grep -v not-backed-up | \ @@ -173,7 +174,7 @@ cat volumes | \ "F={}.dump$COMPRESS_EXT.aescrypt ; vos dump -id {} -localauth -clone | $COMPRESS_PROG | ccrypt -k $KEYFILE -e > \$F ; - cat \$F | catsync -b $BWLIMIT $BACKUPDIR/$SUBDIR/\$F ; + < \$F catsync -b $BWLIMIT $BACKUPDIR/$SUBDIR/\$F ; rm -f \$F" echo backing up databases