Skip to content

Commit 727d65e

Browse files
authored
Merge pull request #8 from janondrusek/main
add CMD trace #6
2 parents 67b93e4 + 18d8177 commit 727d65e

File tree

1 file changed

+9
-2
lines changed
  • usr/local/libexec/rocinante

1 file changed

+9
-2
lines changed

usr/local/libexec/rocinante/cmd.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,29 @@
3232
. /usr/local/etc/rocinante.conf
3333

3434
cmd_usage() {
35-
error_exit "Usage: rocinante cmd command"
35+
error_exit "Usage: rocinante cmd [OPTION] command"
3636
}
3737

38+
OPTION="-xc"
39+
3840
# Handle special-case commands first.
3941
case "$1" in
4042
help|-h|--help)
4143
cmd_usage
4244
;;
45+
-q|--quiet)
46+
OPTION="-c"
47+
shift
48+
;;
4349
esac
4450

4551
if [ $# -eq 0 ]; then
4652
cmd_usage
4753
fi
4854

4955
## execute CMD
50-
sh -c "$@"
56+
info "[CMD]:"
57+
sh "${OPTION}" "$@"
5158
ERROR_CODE="$?"
5259
info "${ERROR_CODE}"
5360

0 commit comments

Comments
 (0)