From 46d0ae5495ed6f58331b2304d6d0b851764c163e Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 18 Aug 2020 14:18:33 +0200 Subject: [PATCH] ci: prepare.sh should accept --history without argument The --history does not take an argument, similar to --help. Move it out of ARGUMENT_LIST so 'getopt' does not complain about it. Signed-off-by: Niels de Vos --- prepare.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/prepare.sh b/prepare.sh index 57ebb86f2..7a413df12 100755 --- a/prepare.sh +++ b/prepare.sh @@ -14,11 +14,10 @@ ARGUMENT_LIST=( "workdir" "gitrepo" "base" - "history" ) opts=$(getopt \ - --longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")help" \ + --longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")history,help" \ --name "$(basename "${0}")" \ --options "" \ -- "$@" @@ -67,7 +66,6 @@ while true; do base=${1} ;; --history) - shift history="yes" ;; --) @@ -89,7 +87,7 @@ then depth='' fi -git clone "${depth}" --branch="${base}" "${gitrepo}" "${workdir}" +git clone ${depth} --branch="${base}" "${gitrepo}" "${workdir}" cd "${workdir}" git fetch origin "${ref}:tip/${ref}" git checkout "tip/${ref}"