utils.sh: tidy up the script

Using "tf-a-<TF-A_LTS_BRANCH>" to change the download space
for the LTS branch

Change-Id: I4d6e7ff1f0ab406ef83e77f4bea4ca8fbdb1e3b8
Signed-off-by: Arthur She <arthur.she@linaro.org>
(cherry picked from commit 2c9ca72a1f20d8ce437943b7e6f0f8c9b987ed09)
diff --git a/openci-env.sh b/openci-env.sh
index edaa68c..26cd707 100644
--- a/openci-env.sh
+++ b/openci-env.sh
@@ -13,3 +13,14 @@
 jenkins_url="http://ci.trustedfirmware.org"
 tfa_downloads="https://downloads.trustedfirmware.org/tf-a"
 ci_env="openci"
+
+tfa_branch=${TF_GERRIT_BRANCH##*/}
+if echo $tfa_branch | grep -q "^lts-v"; then
+    # LTS branch, change the download space to the respective one
+    tfa_downloads="https://downloads.trustedfirmware.org/tf-a-$tfa_branch"
+fi
+
+echo "*************************************"
+echo "ci_env: $ci_env"
+echo "tfa_downloads: $tfa_downloads"
+echo "*************************************"