Commit 2b5a5bcb4e0cb137425f49281d02380705e1d972
1 parent
109f4115
added cleanup rm
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@36 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
5 additions
and
1 deletions
bin/deploy-dms.sh
| @@ -11,3 +11,4 @@ cvs update | @@ -11,3 +11,4 @@ cvs update | ||
| 11 | # sed the version with today's date | 11 | # sed the version with today's date |
| 12 | cat $version | sed 's#@build-date@#`date +%Y%m%d`g' > $tmp | 12 | cat $version | sed 's#@build-date@#`date +%Y%m%d`g' > $tmp |
| 13 | mv $tmp $version | 13 | mv $tmp $version |
| 14 | +rm $tmp |
bin/dms-backup.sh
| @@ -20,7 +20,7 @@ mkdir -p $LOCAL_MOUNT | @@ -20,7 +20,7 @@ mkdir -p $LOCAL_MOUNT | ||
| 20 | # mount the server | 20 | # mount the server |
| 21 | mount_smbfs -N "$BACKUP_SERVER" $LOCAL_MOUNT | 21 | mount_smbfs -N "$BACKUP_SERVER" $LOCAL_MOUNT |
| 22 | 22 | ||
| 23 | -# tar onto the local mount point | 23 | +# tar up the cvs repository |
| 24 | archive=mrc_dms_`date +%Y-%m-%d`.tgz | 24 | archive=mrc_dms_`date +%Y-%m-%d`.tgz |
| 25 | tar czvf /tmp/$archive $BACKUP_FROM | 25 | tar czvf /tmp/$archive $BACKUP_FROM |
| 26 | 26 | ||
| @@ -30,6 +30,9 @@ cp /tmp/$archive "$BACKUP_TO" | @@ -30,6 +30,9 @@ cp /tmp/$archive "$BACKUP_TO" | ||
| 30 | # check that its there | 30 | # check that its there |
| 31 | ls -al "$BACKUP_TO" | 31 | ls -al "$BACKUP_TO" |
| 32 | 32 | ||
| 33 | +# clean up | ||
| 34 | +rm /tmp/$archive | ||
| 35 | + | ||
| 33 | # disconnect twice (for safety and because the first try consistently doesn't work) | 36 | # disconnect twice (for safety and because the first try consistently doesn't work) |
| 34 | umount $LOCAL_MOUNT | 37 | umount $LOCAL_MOUNT |
| 35 | umount $LOCAL_MOUNT | 38 | umount $LOCAL_MOUNT |