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>
diff --git a/scripts/get_tensorflow.sh b/scripts/get_tensorflow.sh
index 30e7bc6..636dddc 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 @@
 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 @@
   [[ $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 @@
 
 # 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 # 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