Skip to content

Commit

Permalink
src/winusb: process_commandline_parameters: setup debug and return tr…
Browse files Browse the repository at this point in the history
…aps only when --verbose

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
  • Loading branch information
brlin-tw committed Jun 5, 2017
1 parent 77d454d commit fe6ddca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/winusb
Expand Up @@ -937,8 +937,12 @@ process_commandline_parameters(){
shift_array parameters
done

if [ "${enable_debug}" = "Y" ]; then
if [ "${verbose}" = "1" ] && [ "${enable_debug}" != "Y" ]; then
trap 'trap_return "${FUNCNAME[0]}"' RETURN
trap 'trap_debug "${BASH_COMMAND}"' DEBUG
fi

if [ "${enable_debug}" = "Y" ]; then
set -o xtrace
fi
return 0
Expand Down

0 comments on commit fe6ddca

Please sign in to comment.