Erik Southworth avatar Erik Southworth committed e52b9df Draft

allow pass opts to console

Comments (0)

Files changed (1)

 	if [ $? != 0 ]; then echo "Try \`${BIN} --help' for more information." >/dev/stderr; exit 1; fi
 
 	# opt flags
-	opt_is_help= opt_is_verbose= opt_has_update= opt_has_game= opt_has_dir= opt_is_wipe= opt_is_version= opt_is_noionice=
+	opt_is_help= opt_is_verbose= opt_has_update= opt_has_game= opt_has_dir=
+	opt_is_wipe= opt_is_version= opt_is_noionice=
 
 	# parse options
 	eval set -- "${_opts}"
 	    -m|--manual) manual;;
 	    -v|--verbose) opt_is_verbose=1; shift;;
 	    -n|--noionice) opt_is_noionice=1; shift;;
-	    -i|--interactive) steam_console;;
+	    -i|--interactive) steam_console "$@";;
 	       --) shift; break;;
 	    *) echo "internal error: uncaught option \`${1}'" >/dev/stderr; exit 2;;
 	    esac
 	# parse positional arguments
 	if test $# -gt 0; then
 	    case "${1}" in
-	    console) steam_console;;
+	    console) steam_console "$@";;
 	    help) opt_is_help=1; shift;;
 	    wipe)
 		cmd+=("-wipe"); opt_is_wipe=1;
 	    [ $i -gt 0 ] && test ! ${operation_is_silent} && printf "${YELLOW}+ Retrying command ...${NORMAL}\n"
 
 	    if test ${operation_is_silent}; then
-		(STEAMEXE=steamcmd "${CONSOLEBIN}" &>/dev/null)
+		(STEAMEXE=steamcmd "${CONSOLEBIN}" "$@" &>/dev/null)
 	    elif test ${opt_is_verbose}; then
-		(STEAMEXE=steamcmd "${CONSOLEBIN}")
+		(STEAMEXE=steamcmd "${CONSOLEBIN}" "$@")
 	    else
-		(STEAMEXE=steamcmd "${CONSOLEBIN}" 2>/dev/null)
+		(STEAMEXE=steamcmd "${CONSOLEBIN}" "$@" 2>/dev/null)
 	    fi
 
 	    if [ $? -eq 0 ]; then break; fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.