script: fix hardcoded cmsis path

At present, clone_repos.sh for the SCP repository and to update
cmsis submodule in it, changes directory using 'cd cmsis'.
This is hardcoded and can break if the path is changed by the
SCP firmware repository.

This change uses 'git submodule status' command to get the exact
location of the submodule so that the script will continue to work
on the cmsis irrespective of the location availabe in the SCP firmware
repo.

Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Change-Id: Ie3b9e9027c3d38196af261e15e02bb7f7bb716c5
diff --git a/script/build_package.sh b/script/build_package.sh
index f4ea34b..26294e0 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -1136,8 +1136,10 @@
 
 	pushd "$scp_root"
 
+	eval cmsis_dir="$(git submodule status | awk 'NR==1{print $2}')"
+
 	# Use filer submodule as a reference if it exists
-	if [ -d "$SCP_CHECKOUT_LOC/cmsis" ]; then
+	if [ -d "$SCP_CHECKOUT_LOC/$cmsis_dir" ]; then
 		cmsis_reference="--reference $SCP_CHECKOUT_LOC/cmsis"
 	fi