X-Git-Url: https://git.donarmstrong.com/?p=spamassassin_config.git;a=blobdiff_plain;f=update_spamassassin;h=1769913350bb46cdcedd7dd138cf55db5874e714;hp=0e08376e90baefa06ba4ba87b8a1e70d2d4b0179;hb=0313d43a790a04ce4625a58bfc72d9eb9dd655c6;hpb=2f2d36225a773d664dcfca545ac9ffc9807180c8 diff --git a/update_spamassassin b/update_spamassassin index 0e08376..1769913 100755 --- a/update_spamassassin +++ b/update_spamassassin @@ -28,7 +28,7 @@ ORIGREV=$(svn info $SACONFIG |awk '/^Revision:/{print $2}') NEWREV=$(svn info $(svn info $SACONFIG|awk '/^URL:/{print $2}')|awk '/^Revision:/{print $2}') # no changes, bug out. -if [ "$ORIGREV" -ge "$NEWREV" ]; then +if [ "0$ORIGREV" -ge "0$NEWREV" ]; then exit 0; fi; @@ -50,6 +50,7 @@ function report_failure(){ # Hrm; a previous update failed; don't report again until the file # is removed if [ -e "$SACONFIG/failed_update" ]; then + rm -rf "$TMPDIR" exit 0; fi; echo "$FAILUREMESSAGE" >> "$SACONFIG/failed_update" @@ -62,6 +63,7 @@ is fixed. Please fix the problem and then remove $SACONFIG/failed_update EOF + rm -rf "$TMPDIR" exit 1; }