From: Mark Wooding Date: Mon, 5 Sep 2011 09:17:55 +0000 (+0100) Subject: bin/sign: More care with replacing the old publish directory. X-Git-Url: https://git.distorted.org.uk/~mdw/ssh-ca/commitdiff_plain/1535a6d2e28e313da46c8a9dfcf628f0fefd4288 bin/sign: More care with replacing the old publish directory. Don't delete the old backup or try to rename if there isn't a good newer version. It'll fail, and clobber the only good version we have. --- diff --git a/bin/sign b/bin/sign index 5e75ea9..833c2a1 100755 --- a/bin/sign +++ b/bin/sign @@ -73,7 +73,9 @@ rm publish.new/hosts.list run_gpg --export --armor -o publish.new/ca-gnupg.asc ## Done. -rm -rf publish.old -mv publish publish.old +if [ -d publish ]; then + rm -rf publish.old + mv publish publish.old +fi mv publish.new publish rm -rf publish.old