diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-01-22 21:04:43 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-01-22 21:04:43 (EST) |
commit | 1b99492c61002f4038ce2cf37b63b26c6b4b1e5b (patch) | |
tree | fd9d776efec3f8da03f39a7394355c434ba8788c /src/cmd.sh | |
parent | c057f6d6109f43fd31094d8ac220162d4a6a8274 (diff) |
run_cmd(): Return command's exit status
Diffstat (limited to 'src/cmd.sh')
-rw-r--r-- | src/cmd.sh | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -108,6 +108,7 @@ run_cmd() { local cmd="${1}" local cmd_clean= + local es= shift cmd_clean="$(printf '%s' "${cmd}" | \ @@ -116,6 +117,7 @@ run_cmd() running_cmd="${cmd}" running_cmd_clean="${cmd_clean}" "cmd_${cmd_clean}_main" "${@}" + es=${?} running_cmd='' running_cmd_clean='' else @@ -123,5 +125,5 @@ run_cmd() return 1 fi - return 0 + return ${es} } |