summaryrefslogtreecommitdiff
path: root/tcwg-llvm-common.sh
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2017-05-05 10:37:43 +0100
committerRenato Golin <renato.golin@linaro.org>2017-05-05 11:57:11 +0000
commit00b4d7621096d09602f9da9525b98cc472e6dc37 (patch)
tree8eb9de7722b3c938226e93cddc6304819545fbd7 /tcwg-llvm-common.sh
parentf311b7022d0e1cf0890db4ec3c3dd447d3af94a0 (diff)
tcwg-llvm-common.sh: Fix shellcheck warnings.
Fixing this warning means that errors from the push_binary_* functions won't be silently ignored. $ shellcheck tcwg-llvm-common.sh In tcwg-llvm-common.sh line 93: local PUSHDIR="$(push_binary_dir "$TYPE")" ^-- SC2155: Declare and assign separately to avoid masking return values. In tcwg-llvm-common.sh line 101: local BINARY="$(push_binary_name "$TAG" "$TRIPLE")" ^-- SC2155: Declare and assign separately to avoid masking return values. In tcwg-llvm-common.sh line 102: local PUSHDIR="$(push_binary_dir "$TYPE")" ^-- SC2155: Declare and assign separately to avoid masking return values. Change-Id: I075e9490ea10ca857bb6dda13274d862048f4251
Diffstat (limited to 'tcwg-llvm-common.sh')
-rwxr-xr-xtcwg-llvm-common.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tcwg-llvm-common.sh b/tcwg-llvm-common.sh
index 3f0c9937..5ad03a65 100755
--- a/tcwg-llvm-common.sh
+++ b/tcwg-llvm-common.sh
@@ -90,7 +90,8 @@ push_binary_dir() {
push_scp_url() {
local TYPE="$1" # ex: releases/binaries
- local PUSHDIR="$(push_binary_dir "$TYPE")"
+ local PUSHDIR
+ PUSHDIR="$(push_binary_dir "$TYPE")"
echo "$PUSHSERVER:public_html/$PUSHDIR"
}
@@ -98,7 +99,9 @@ push_wget_url() {
local TAG="$1" # ex: ci12, 4.0.0-rc1, r300293
local TRIPLE="$2" # ex: aarch64-linux-gnu
local TYPE="$3" # ex: releases/binaries
- local BINARY="$(push_binary_name "$TAG" "$TRIPLE")"
- local PUSHDIR="$(push_binary_dir "$TYPE")"
+ local BINARY
+ BINARY="$(push_binary_name "$TAG" "$TRIPLE")"
+ local PUSHDIR
+ PUSHDIR="$(push_binary_dir "$TYPE")"
echo "http://$PUSHSERVER/~$PUSHUSER/$PUSHDIR/$BINARY.$PUSHSUFFIX"
}