Compare commits

..

1 Commits

Author SHA1 Message Date
cryobry
4d0220f129 Add toolboxRun plugin 2020-04-16 15:09:04 -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"
declare -ga _cmd_array=("$@") _cmd_array=("$@")
} }
@@ -151,8 +151,10 @@ 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[@]}"
} }
@@ -177,7 +179,7 @@ EOF
_runDebug "${FUNCNAME[0]}" _runDebug "${FUNCNAME[0]}"
toolbox rm -f "$_cname" "${_quiet[@]}" toolbox rm "$_cname" "${_quiet[@]}"
} }
@@ -185,8 +187,6 @@ 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 || -n $_ephemeral ]]; then if [[ -n $_recreate ]]; then # First remove container if --recreate
_toolboxRemove _toolboxRemove
fi fi
else else