aboutsummaryrefslogtreecommitdiff
path: root/libs/tool
diff options
context:
space:
mode:
Diffstat (limited to 'libs/tool')
-rwxr-xr-xlibs/tool6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/tool b/libs/tool
index 2732238a..f4e8a783 100755
--- a/libs/tool
+++ b/libs/tool
@@ -97,19 +97,21 @@ tool_action() {
return 0
fi
- printf 1>&2 '%s\n' "Tool $tool $action (with ${arguments:-no argument})"
+ printf '%s\n\n' "Tool $tool $action (with ${arguments:-no argument})"
(
set -e
+
"$action" "$@"
)
if [[ $? -ne 0 ]]
then
printf 1>&2 '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) failed"
+
return 1
else
- printf 1>&2 '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) completed"
+ printf '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) completed"
fi
)
}