mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 04:46:29 +00:00
27 lines
385 B
Plaintext
27 lines
385 B
Plaintext
![]() |
#
|
||
|
# This file contains useful Bash functions
|
||
|
# and can be "source"d from the scripts.
|
||
|
#
|
||
|
|
||
|
for a in "$@" ; do
|
||
|
OPTION_COUNT+=1
|
||
|
case "$a" in
|
||
|
--*=*)
|
||
|
[[ $a =~ --([^=]+)=(.*) ]]
|
||
|
l=${BASH_REMATCH[1]//-/_}
|
||
|
r=${BASH_REMATCH[2]}
|
||
|
eval ${l^^}=\"$r\"
|
||
|
;;
|
||
|
--*)
|
||
|
[[ $a =~ --(.+) ]]
|
||
|
l=${BASH_REMATCH[1]//-/_}
|
||
|
eval ${l^^}=1
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
runner() {
|
||
|
( set -x ; "$@" )
|
||
|
}
|
||
|
|