Skip to content

Commit

Permalink
add QUIET mode, -q | --quiet opt (don't output to stdout)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Sep 16, 2024
1 parent cfdfa24 commit d4f83dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/gm2xpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ help_func() {
\t -c, --clean remove ./package ./opkg_assets ./<target_name>.ipk ./<target_name>.zip ./<link_name>lnk
\t -g, --gencfg generate standard config \"pkg.cfg\" file in PWD
\t -f, --force force execution even without present target's binary or incompatible .cfg version
\t -q, --quiet don't output messages to stdout
Instructions:
\t 1. Put inside PWD:
\t\t- ./<target_name> binary
Expand Down Expand Up @@ -134,7 +135,7 @@ test $# -ne 0 &&\
PKGCFG="${!#}" || PKGCFG="pkg.cfg" # last argument used of [FILE] or use default ./pkg.cfg placement

case "${PKGCFG}" in
-h|--help|-V|--ver|--version|-v|--verbose|-i|--ipk|-z|--zip|-p|--pkg|-c|--clean|-g|--gencfg|-f|--force)
-h|--help|-V|--ver|--version|-v|--verbose|-i|--ipk|-z|--zip|-p|--pkg|-c|--clean|-g|--gencfg|-f|--force|-q|--quiet)
PKGCFG="pkg.cfg"
;;
*)
Expand Down Expand Up @@ -215,6 +216,10 @@ do
echo -e "forcing EXECution commands"
shift
;;
-q | --quiet)
exec > /dev/null 2>&1
shift
;;
--)
shift
break
Expand Down

0 comments on commit d4f83dd

Please sign in to comment.