diff --git a/lug-helper.sh b/lug-helper.sh index 03ecea7..5bf6445 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -368,7 +368,10 @@ message() { # info message # call format: message info "text to display" printf "\n$2\n\n" - read -n 1 -s -p "Press any key..." + if [ "$cmd_line" != "true" ]; then + # Don't pause if we've been invoked via command line arguments + read -n 1 -s -p "Press any key..." + fi ;; "warning") # warning message @@ -2565,6 +2568,7 @@ Usage: lug-helper # Call the requested functions and exit if [ "${#cargs[@]}" -gt 0 ]; then + cmd_line="true" for (( x=0; x<"${#cargs[@]}"; x++ )); do ${cargs[x]} done