]> granicus.if.org Git - postgis/commitdiff
[check-all-upgrades] Fix handling of bogus commandline
authorSandro Santilli <strk@kbt.io>
Wed, 14 Aug 2019 11:06:20 +0000 (11:06 +0000)
committerSandro Santilli <strk@kbt.io>
Wed, 14 Aug 2019 11:06:20 +0000 (11:06 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17710 b70326c6-7e19-0410-871a-916f4a2858ee

utils/check_all_upgrades.sh

index 51c4d8b3e8127e2b977c2bc4f39ffcff81dd2689..74d4b46d2a8a4c8b34ffd6cc0970291b0a7e8f72 100755 (executable)
@@ -1,17 +1,19 @@
 #!/bin/sh
 
+EXIT_ON_FIRST_FAILURE=0
+
+if test "$1" = "-s"; then
+  EXIT_ON_FIRST_FAILURE=1
+  shift
+fi
+
 if test -z "$1"; then
   echo "Usage: $0 [-s] <to_version>" >&2
   echo "Options:" >&2
   echo "\t-s  Stop on first failure" >&2
   exit 1
 fi
-EXIT_ON_FIRST_FAILURE=0
 
-if test "$1" = "-s"; then
-  EXIT_ON_FIRST_FAILURE=1
-  shift
-fi
 to_version="$1"