From 4c34b3473662d5b367b1c7f75cbe9e9f2e79835d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 14 Jun 2019 16:43:18 -0400 Subject: [PATCH] Exit when no writefreely executable found (or `writefreely -v` otherwise doesn't output anything) Ref T555 --- scripts/upgrade-server.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade-server.sh b/scripts/upgrade-server.sh index 1bfab71..039fde8 100755 --- a/scripts/upgrade-server.sh +++ b/scripts/upgrade-server.sh @@ -36,6 +36,9 @@ url=`curl -s https://api.github.com/repos/writeas/writefreely/releases/latest | # check current version current=`./writefreely -v` +if [ -z "$current" ]; then + exit 1 +fi echo "Current version is v${current:(-5):5}"