From f4164e65df295abe2644b69798541ca955fa20c6 Mon Sep 17 00:00:00 2001 From: meek2100 <34908880+meek2100@users.noreply.github.com> Date: Fri, 23 May 2025 12:06:52 -0700 Subject: [PATCH] Improve logging with debug trace option. --- opkgscript.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opkgscript.sh b/opkgscript.sh index c5844a9..71612e1 100755 --- a/opkgscript.sh +++ b/opkgscript.sh @@ -52,6 +52,7 @@ Options: -u update the package database -t test only, execute opkg commands with --noaction -v be verbose + -x enable shell debug tracing (set -x) Configuration: IPK_CACHE_ALL_VERSIONS in script controls whether to cache all .ipk versions or just the latest. @@ -96,7 +97,7 @@ the call to opkg to write the list of installed packages, though. trap cleanup SIGHUP SIGINT SIGTERM EXIT # parse command line options -while getopts "htuv" OPTS; do +while getopts "htuvx" OPTS; do case $OPTS in t ) OPKGOPT="$OPKGOPT --noaction";; @@ -104,6 +105,8 @@ while getopts "htuv" OPTS; do UPDATE=true;; v ) VERBOSE=true;; + x ) + DEBUG_TRACE=true; VERBOSE=true;; [h\?*] ) echo_usage exit 0;;