libgo: use POSIX shell arithmetic expansion

Avoid bash-specific ((expression)) syntax.  As the bash syntax
converts a non-zero value to a zero status (and a zero value to a 1
status), and POSIX arithmetic expansion does not, we have to negate
the result.

Based on patch by Sören Tempel.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154
This commit is contained in:
Ian Lance Taylor 2022-07-22 11:38:20 -07:00
parent 41da4070a2
commit cf17256105
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
ff68b1a147eb60082fd60c198db0ef5477ade938 a62f20ae78ddd41be682dde8cab075ca4f5dbb2a
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.

View File

@ -111,7 +111,7 @@ gobuild() {
if test "$goarch" != "386"; then if test "$goarch" != "386"; then
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
fi fi
(($line)) return $((!($line)))
} }
matched= matched=

View File

@ -302,7 +302,7 @@ gobuild() {
if test "$goarch" != "386"; then if test "$goarch" != "386"; then
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
fi fi
(($line)) return $((!($line)))
} }
case "x$gofiles" in case "x$gofiles" in