[PATCH 1/3] Replace the '==' bashism with the posix equivalent '='.

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sun Feb 24 01:48:03 PST 2013


The quotes are not needed either (nothing to expand there).

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>
---
 scripts/get-version |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/get-version b/scripts/get-version
index 4da0185..4427ca0 100755
--- a/scripts/get-version
+++ b/scripts/get-version
@@ -5,7 +5,7 @@
 #      (see below)
 
 set -eu
-#set -x
+set -x
 
 croak() {
 	echo "$0: $*" >&2
@@ -40,7 +40,7 @@ case $os in
 		# do we need to add another digit?
 		# We know there are 1 or 2 dots in $v, so if it's just one
 		# or we are trying to get to 4, add one digit
-		if [ ${#dots} -eq 1 ] || [ $os == "win" ]; then
+		if [ ${#dots} -eq 1 ] || [ $os = win ]; then
 			if [ $# -gt 1 ]; then
 				v=$v.$2
 			else
@@ -48,7 +48,7 @@ case $os in
 			fi
 		fi
 		# and if it was just one dot and we want 4, at another 0
-		if [ ${#dots} -eq 1 ] && [ $os == "win" ]; then
+		if [ ${#dots} -eq 1 ] && [ $os = win ]; then
 			v=$v.0
 		fi
 		;;
-- 
1.7.10.4



More information about the subsurface mailing list