Compare commits
1 Commits
f2143633c5
...
256a93ed38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
256a93ed38 |
@@ -45,10 +45,6 @@ OPTIONS
|
||||
--debug, -d
|
||||
Display debugging output
|
||||
|
||||
--array, -a ARRAY
|
||||
Read arguments from an existing or new ARRAY (bash >= 4.3)
|
||||
This is useful to reduce parsing errors and recommended for build-wrapper plugins
|
||||
|
||||
--silent, -s
|
||||
Don't output anything from this program (container output will still be passed to stdout
|
||||
if -it option is used instead of -d, see `man podman run` for more information)
|
||||
@@ -74,10 +70,10 @@ EOF
|
||||
_runDebug "${FUNCNAME[0]}" "$@"
|
||||
|
||||
# Unset vars
|
||||
unset _array
|
||||
unset _cname _image _release _ephemeral _recreate _no_sh _debug _silent
|
||||
|
||||
# Parse input and set switches using getopt
|
||||
if _input=$(getopt -o +c:i:r:a:ndsh -l container:,image:,release:,ephemeral,recreate,no-sh,debug,array:,silent,help -- "$@"); then
|
||||
if _input=$(getopt -o +c:i:r:ndsh -l container:,image:,release:,ephemeral,recreate,no-sh,debug,silent,help -- "$@"); then
|
||||
eval set -- "$_input"
|
||||
while true; do
|
||||
case "$1" in
|
||||
@@ -103,10 +99,6 @@ EOF
|
||||
_debug="true"
|
||||
echo "Debugging on!"
|
||||
;;
|
||||
--array|-a)
|
||||
shift && _array="$1"
|
||||
break
|
||||
;;
|
||||
--silent)
|
||||
#_silent="true"
|
||||
;;
|
||||
@@ -125,15 +117,6 @@ EOF
|
||||
_printHelpAndExit 1
|
||||
fi
|
||||
|
||||
# If array mode, load input array, reparse input, and return
|
||||
if [[ -n $_array ]]; then
|
||||
checkBashVersion
|
||||
local _n_array
|
||||
declare -n _n_array="$_array"
|
||||
_parseInput "${_n_array[@]}"
|
||||
return
|
||||
fi
|
||||
|
||||
# Create _pre_commands_array from remaining arguments
|
||||
# shift getopt parameters away
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
Reference in New Issue
Block a user