Compare commits

..

1 Commits

Author SHA1 Message Date
cryobry
d884f07838 Add toolboxRun plugin 2020-04-16 15:23:30 -04:00

View File

@@ -142,7 +142,7 @@ EOF
# create array # create array
declare -a _cmd_array declare -a _cmd_array
_program="$1" _program="$1"
_cmd_array=("$@") declare -ga _cmd_array=("$@")
} }
@@ -151,10 +151,8 @@ EOF
_runDebug "${FUNCNAME[0]}" _runDebug "${FUNCNAME[0]}"
if [[ -z $_no_sh ]]; then if [[ -z $_no_sh ]]; then
_cmd_array=("sh" "-c" "${_cmd_array[@]}") _cmd_array=("sh" "-c" "${_cmd_array[*]}")
fi fi
[[ -n $_debug ]] && echo "_cmd_array:" "${_cmd_array[@]}"
} }
@@ -179,7 +177,7 @@ EOF
_runDebug "${FUNCNAME[0]}" _runDebug "${FUNCNAME[0]}"
toolbox rm "$_cname" "${_quiet[@]}" toolbox rm -f "$_cname" "${_quiet[@]}"
} }
@@ -187,6 +185,8 @@ EOF
_runDebug "${FUNCNAME[0]}" _runDebug "${FUNCNAME[0]}"
[[ -n $_debug ]] && echo "_cmd_array:" "${_cmd_array[@]}"
toolbox run -c "$_cname" "${_cmd_array[@]}" toolbox run -c "$_cname" "${_cmd_array[@]}"
} }
@@ -204,7 +204,7 @@ EOF
# Check if container exists # Check if container exists
if _toolboxExists; then if _toolboxExists; then
if [[ -n $_recreate ]]; then # First remove container if --recreate if [[ -n $_recreate || -n $_ephemeral ]]; then
_toolboxRemove _toolboxRemove
fi fi
else else