Debian Codegraph @

tests/CI/ci.functions

raw
1 #
2 # This file contains useful Bash functions
3 # and can be "source"d from the scripts.
4 #
5
6 declare -a POSITIONAL_ARGS
7 for a in "$@" ; do
8 OPTION_COUNT+=1
9 case "$a" in
10 --*=*)
11 [[ $a =~ --([^=]+)=(.*) ]]
12 l=${BASH_REMATCH[1]//-/_}
13 r=${BASH_REMATCH[2]}
14 eval ${l^^}=\"$r\"
15 ;;
16 --*)
17 [[ $a =~ --(.+) ]]
18 l=${BASH_REMATCH[1]//-/_}
19 eval ${l^^}=1
20 ;;
21 *)
22 POSITIONAL_ARGS+=($a)
23 ;;
24 esac
25 done
26
27 runner() {
28 ( set -x ; ${@} )
29 }
30