From 11c09aeba432f53a0e92d68d62c054a85fc70161 Mon Sep 17 00:00:00 2001 From: Ivan Ilves Date: Sun, 2 Apr 2017 17:40:35 +0200 Subject: [PATCH] Do not touch "discover-routes", if it does not exist! --- scripts/client-preexec.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/client-preexec.sh b/scripts/client-preexec.sh index bea84df..662189f 100755 --- a/scripts/client-preexec.sh +++ b/scripts/client-preexec.sh @@ -2,7 +2,9 @@ # # Execute *before* doing anything # -if [[ "$(sha1sum discover-routes | cut -f1 -d' ')" == "246d9bbeded14ef58e5bc103af0f8c2e8b2e8cf2" ]]; then - echo "!!! Rewriting stale 'discover-routes' script" - cp discover-routes.aws.example discover-routes +if [[ -f discover-routes ]]; then + if [[ "$(sha1sum discover-routes | cut -f1 -d' ')" == "246d9bbeded14ef58e5bc103af0f8c2e8b2e8cf2" ]]; then + echo "!!! Rewriting stale 'discover-routes' script" + cp discover-routes.aws.example discover-routes + fi fi