From 55b19fc37a7cee40f186b3437c622ad78a4024ac Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 3 Aug 2004 05:10:25 +0000 Subject: [PATCH] Check for 01 and 08, not 1 and 8, when checking date --- bin/critical-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/critical-backup b/bin/critical-backup index 0ddd307..cb50213 100755 --- a/bin/critical-backup +++ b/bin/critical-backup @@ -34,7 +34,7 @@ scp -Bq -oSetupTimeout=30 $ARCHIVE right:backup/ 2>/dev/null scp -Bq $ARCHIVE snowball:tpope.tar.gpg 2>/dev/null d="`date +%d`" -if [ "$d" = 1 -o "$d" = 8 -o "$d" = 16 -o "$d" = 23 -o "$1" = "-m" ]; then +if [ "$d" = 01 -o "$d" = 08 -o "$d" = 16 -o "$d" = 23 -o "$1" = "-m" ]; then mimencode $ARCHIVE | mail -s "Backup for `date +%Y-%m-%d`" $EMAIL \ -a "Content-Type: application/octet-stream; name=$ARCHIVE" \ -a "Content-Disposition: attachment; filename=$ARCHIVE" \ @@ -56,7 +56,7 @@ elif [ "`date +%m%d`" = "1231" ]; then echo "Error. Is the CD in the drive?" >&2 fi echo "Yearly backup finished. Please put a blank CD in the drive." >&2 -elif [ "$d" = 1 -o "$d" = 8 -o "$d" = 16 -o "$d" = 23 ]; then +elif [ "$d" = 01 -o "$d" = 08 -o "$d" = 16 -o "$d" = 23 ]; then s="`sudo cdrecord -msinfo 2>/dev/null`" if [ "$s" ]; then mkisofs -r -J -o back.iso -M /dev/cdr -C "$s" "$HOME/backup-`date +%Y`" 2>/dev/null -- 2.30.2