mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
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 <ndevos@redhat.com>
This commit is contained in:
parent
64588e2b1c
commit
46d0ae5495
@ -14,11 +14,10 @@ ARGUMENT_LIST=(
|
|||||||
"workdir"
|
"workdir"
|
||||||
"gitrepo"
|
"gitrepo"
|
||||||
"base"
|
"base"
|
||||||
"history"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
opts=$(getopt \
|
opts=$(getopt \
|
||||||
--longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")help" \
|
--longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")history,help" \
|
||||||
--name "$(basename "${0}")" \
|
--name "$(basename "${0}")" \
|
||||||
--options "" \
|
--options "" \
|
||||||
-- "$@"
|
-- "$@"
|
||||||
@ -67,7 +66,6 @@ while true; do
|
|||||||
base=${1}
|
base=${1}
|
||||||
;;
|
;;
|
||||||
--history)
|
--history)
|
||||||
shift
|
|
||||||
history="yes"
|
history="yes"
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
@ -89,7 +87,7 @@ then
|
|||||||
depth=''
|
depth=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone "${depth}" --branch="${base}" "${gitrepo}" "${workdir}"
|
git clone ${depth} --branch="${base}" "${gitrepo}" "${workdir}"
|
||||||
cd "${workdir}"
|
cd "${workdir}"
|
||||||
git fetch origin "${ref}:tip/${ref}"
|
git fetch origin "${ref}:tip/${ref}"
|
||||||
git checkout "tip/${ref}"
|
git checkout "tip/${ref}"
|
||||||
|
Loading…
Reference in New Issue
Block a user