diff options
author | James Conroy <james.conroy@arm.com> | 2022-04-20 17:16:50 +0100 |
---|---|---|
committer | James Conroy <james.conroy@arm.com> | 2022-05-03 18:08:35 +0100 |
commit | 04cd60384f5fc8455bb7cf64416daa7b001754d1 (patch) | |
tree | 7406d106d9906740787dd2e2cc8967f701414bc2 /scripts/get_tensorflow.sh | |
parent | ad813ecb139ca26701986656a144708155572773 (diff) | |
download | armnn-04cd60384f5fc8455bb7cf64416daa7b001754d1.tar.gz |
IVGCVSW-6924 Fix shellcheck warnings
* Fix shellcheck warnings, some have been
suppressed using shellcheck ignore.
Change-Id: Icae175a42bb348a58befb296949edca51713e977
Signed-off-by: James Conroy <james.conroy@arm.com>
Diffstat (limited to 'scripts/get_tensorflow.sh')
-rwxr-xr-x | scripts/get_tensorflow.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/get_tensorflow.sh b/scripts/get_tensorflow.sh index 30e7bc6c3c..636dddcaf4 100755 --- a/scripts/get_tensorflow.sh +++ b/scripts/get_tensorflow.sh @@ -5,7 +5,7 @@ # SPDX-License-Identifier: MIT # -CMD=$( basename $0 ) +CMD=$( basename "$0" ) # Revision or tag that Arm NN has been tested with: DEFAULT_TENSORFLOW_REVISION="tags/v2.5.0" # Release 2.5.0 tag @@ -38,11 +38,11 @@ function AssertZeroExitCode { TENSORFLOW_REVISION=$DEFAULT_TENSORFLOW_REVISION # process the options given -while getopts "s:ph\?:" opt; do +while getopts "s:ph" opt; do case "$opt" in s) TENSORFLOW_REVISION="$OPTARG";; p) PrintDefaultTensorFlowSha;; - h|\?) Usage;; + h) Usage;; esac done shift $((OPTIND - 1)) @@ -62,8 +62,8 @@ while [ -h "$SRC" ]; do [[ $SRC != /* ]] && SRC="$DIR/$SRC" done DIR="$( cd -P "$( dirname "$SRC" )" >/dev/null && pwd )" -pushd ${DIR} > /dev/null -cd ../.. +pushd "${DIR}" > /dev/null +cd ../.. || exit # Clone TensorFlow if we don't already have a directory if [ ! -d tensorflow ]; then @@ -75,7 +75,7 @@ pushd tensorflow > /dev/null # Checkout the TensorFlow revision echo "Checking out ${TENSORFLOW_REVISION}" -git fetch && git checkout ${TENSORFLOW_REVISION} +git fetch && git checkout "${TENSORFLOW_REVISION}" AssertZeroExitCode "Fetching and checking out ${TENSORFLOW_REVISION} failed" # If the target tensorflow revision includes a branch we also need to do a pull. # This generally occurs with a release branch. @@ -88,5 +88,5 @@ popd > /dev/null # out of tensorflow popd > /dev/null # back to wherever we were when called # Make sure the SHA of the revision that was checked out is the last line # of output from the script... just in case we ever need it. -echo $TENSORFLOW_REVISION +echo "$TENSORFLOW_REVISION" exit 0 |