summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-05-19 14:15:21 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-05-19 14:15:21 +0200
commit468574e91b5bfcec358e6186a272f75c258097c5 (patch)
treed9b73e0e57d942379e829fdb7c1bc09053af269b
parent2948bac18157276bf52c99c7a630e27760f1b5e6 (diff)
Allow to specify the repository path on the command linev0.2
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rwxr-xr-xpmwg-ci-integ9
1 files changed, 9 insertions, 0 deletions
diff --git a/pmwg-ci-integ b/pmwg-ci-integ
index 82e1195..88d7f74 100755
--- a/pmwg-ci-integ
+++ b/pmwg-ci-integ
@@ -78,6 +78,15 @@
# the local repo with the name 'integ-<commit-id>
#
+# Give the opportunity the caller of the script to specify the directory
+# where the repository is located, otherwise default to the current
+# directory
+REPOPATH=${1:-$PWD}
+
+# Use pushd here so when the script exits, the CWD will automatically
+# be the initial one before calling this script.
+pushd $REPOPATH
+
# The configuration file containing the name + url + branch
CONFIG=$(pmwg-ci-config)