From: Don Armstrong Date: Sat, 19 Sep 2009 23:44:12 +0000 (+0000) Subject: * fix update spamassassin to cd back to the original directory, which X-Git-Url: https://git.donarmstrong.com/?p=spamassassin_config.git;a=commitdiff_plain;h=b18d6eb3b3a58e06d008c3e102e8fd26b987594a * fix update spamassassin to cd back to the original directory, which hopefully will stop problems with removing the tempdir git-svn-id: svn+ssh://svn.debian.org/svn/pkg-listmaster/trunk/spamassassin_config@316 0b7a5b0c-1f2c-0410-bd74-c376f8064c91 --- diff --git a/update_spamassassin b/update_spamassassin index 3ffa065..ef9fef7 100755 --- a/update_spamassassin +++ b/update_spamassassin @@ -69,6 +69,7 @@ EOF } cp -ar $SACONFIG $TMPDIR/. +OLDDIR="$(pwd)" cd $TMPDIR/spamassassin_config; svn update -q --non-interactive; if svn status |grep -q '^C'; then @@ -76,7 +77,7 @@ if svn status |grep -q '^C'; then FAILUREMESSAGE="$FAILUREMESSAGE$(svn status|grep ^C)"; report_failure fi; -cd - >/dev/null 2>&1 +cd "$(pwd)" if ! spamassassin -p $TMPDIR/spamassassin_config/$USERCONF --lint > $TMPDIR/sa_lint 2>&1; then FAILUREMESSAGE="$(echo -e 'spamassassin -p $TMPDIR/spamassassin_config/$USERCONF --lint\nfailed with\n'| cat - $TMPDIR/sa_lint)";