summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYvan Roux <yvan.roux@linaro.org>2015-07-17 22:45:16 +0200
committerYvan Roux <yvan.roux@linaro.org>2015-07-17 22:45:16 +0200
commit2121bf76ec21406c02f010024ee8fb2aa0773770 (patch)
treec30ec22266508123afd81bf5fda5e967530d94da
parent278347bbb4e6d28d8e2234d388096adf0b82a15a (diff)
Cleanup double-parentheses arithmetic expression.
This construct allows C-style variable manipulation and thus $ are not needed. Change-Id: I431f1a8ab11d8822f4395b8663a7efe7e9f12b8a
-rwxr-xr-xtcwg-release.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/tcwg-release.sh b/tcwg-release.sh
index 8780d30..7434f09 100755
--- a/tcwg-release.sh
+++ b/tcwg-release.sh
@@ -422,11 +422,11 @@ do
;;
r ) CANDIDATE=1
# If the next input is not a -option then it is an optional RC arg.
- [[ ${!OPTIND} =~ ^-. ]] || { RC=${!OPTIND} ; OPTIND=$(( $OPTIND + 1)); }
+ [[ ${!OPTIND} =~ ^-. ]] || { RC=${!OPTIND} ; OPTIND=$(( OPTIND + 1 )); }
# If the next input is not a -option then it is an optional SPIN
# arg.
- [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( $OPTIND + 1)); }
+ [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( OPTIND + 1 )); }
# The default RC for release candidates is '1'. Set it if it's
# undefined or the null string. The leading colon causes the
@@ -438,12 +438,12 @@ do
R ) RELEASE=1
# If the next input is not a -option then it is an optional SPIN
# arg.
- [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( $OPTIND + 1)); }
+ [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( OPTIND + 1 )); }
;;
S ) SNAPSHOT=1
# If the next input is not a -option then it is an optional SPIN
# arg.
- [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( $OPTIND + 1)); }
+ [[ ${!OPTIND} =~ ^-. ]] || { SPIN=${!OPTIND} ; OPTIND=$(( OPTIND + 1 )); }
;;
t ) TAG="$OPTARG"
;;
@@ -460,7 +460,7 @@ if [ $# -lt 1 ]; then
extended_usage
fi
-shift $(($OPTIND - 1))
+shift $(( OPTIND - 1 ))
# If DATE wasn't set by the user, set it.
: ${DATE:=$(date -d "$today" +%Y.%m)}
@@ -537,7 +537,7 @@ release=${vstring%.*}-"$DATE"
if [ "${SNAPSHOT:+set}" = "set" ]; then
# If SPIN isn't set it'll end up being '1'.
- bump_to="${release}-$((${SPIN}+1))~dev"
+ bump_to="${release}-$(( SPIN + 1 ))~dev"
fi
# The local branch can have the SPIN number on the name.
@@ -593,7 +593,7 @@ if [ "${SNAPSHOT:+set}" = "set" ]; then
fi
# Terminal lines (minus 7 to account for interesting prior output.
-terminal_lines=$(($(tput lines) - 7))
+terminal_lines=$(( $(tput lines) - 7 ))
ask "To see the most recent commits on the tracked branch press [Enter]." user_ok