projects
/
tpope-extra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
399dd86
)
Check for 01 and 08, not 1 and 8, when checking date
author
Tim Pope
<code@tpope.net>
Tue, 3 Aug 2004 05:10:25 +0000
(
05:10
+0000)
committer
Tim Pope
<code@tpope.net>
Tue, 3 Aug 2004 05:10:25 +0000
(
05:10
+0000)
bin/critical-backup
patch
|
blob
|
history
diff --git
a/bin/critical-backup
b/bin/critical-backup
index 0ddd307125262e44a231e9fb43e6c65b0f22f063..cb502131b9fc4acf4c8fbae26ff141515c30731e 100755
(executable)
--- 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`"
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" = 0
8 -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" \
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
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" = 0
8 -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
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