btrfs-progs: ci: fix docker-run argument parsing
The runner script allows to pass arguments to docker and the final command, using the -- separator. This did not work as expected, the arguments got concatenated to the first member, not all of them passed. The following now works: $ ./docker-run --env CC=clang $ ./docker-run --env CC=clang -- $ ./docker-run --env CC=clang -- /bin/bash Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
21a33e673d
commit
b02d151bd1
|
@ -1,16 +1,15 @@
|
|||
#!/bin/bash
|
||||
# Run the container
|
||||
# $0 [docker arguments] [--] [command and arguments]
|
||||
# $0 [docker arguments] [-- command and arguments]
|
||||
|
||||
prefix=kdave
|
||||
image=$(basename `pwd` | tr '[A-Z]' '[a-z]')
|
||||
|
||||
declare -a ARGS
|
||||
while :; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--) shift; break;;
|
||||
--*) ARGS+="$1"; shift;;
|
||||
*) break;;
|
||||
*) ARGS+=("$1"); shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue