diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-07-18 16:18:51 +0530 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2018-08-29 12:06:12 +0200 |
commit | d4a214dc6bc866744157ee39ae8011e78b803ccc (patch) | |
tree | 9b5db1eb51bd17d985f8ef61eac935c9caf9c7b1 | |
parent | 3a124b77a6ae921eae0549a182e98a58dcf57973 (diff) |
ci-merge: Allow specifying config file on the cmdline
Rather than depending on ci-config being available in the path, just allow
--config to be specified directly with ci-merge.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[Refactor for master branch]
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rwxr-xr-x | ci-merge | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -148,8 +148,8 @@ Help() { # options_setup() { - SHORTOPT="hl:r:b:i:t:c:" - LONGOPT="help,local:,remote:,baseline:,integ:,track:,cache:" + SHORTOPT="hl:r:b:i:t:c:f:" + LONGOPT="help,local:,remote:,baseline:,integ:,track:,cache:,config:" OPTS=$(getopt -o $SHORTOPT -l $LONGOPT -- "$@") @@ -203,6 +203,9 @@ options_setup() { RERERE_CACHE=$1 ;; + --config|-f) + CONFIG=$1 + ;; --) break ;; @@ -288,7 +291,9 @@ terminal() { config_setup() { # The configuration file containing the name + url + branch - CONFIG=$(ci-config) + if [ -z "${CONFIG}" ]; then + CONFIG=$(ci-config) + fi if [ "$CONFIG" == "" ]; then echo "No configuration file found, aborting." |