mirror of
				https://github.com/the-sane/lug-helper.git
				synced 2025-10-31 13:46:29 +00:00 
			
		
		
		
	Fix a few old lingering printf syntax errors
This commit is contained in:
		| @@ -353,7 +353,7 @@ message() { | ||||
|             "info") | ||||
|                 # info message | ||||
|                 # call format: message info "text to display" | ||||
|                 printf "\n$2\n\n" | ||||
|                 printf "\n%s\n\n" "$2" | ||||
|                 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..." | ||||
| @@ -362,19 +362,19 @@ message() { | ||||
|             "warning") | ||||
|                 # warning message | ||||
|                 # call format: message warning "text to display" | ||||
|                 printf "\n$2\n\n" | ||||
|                 printf "\n%s\n\n" "$2" | ||||
|                 read -n 1 -s -p "Press any key..." | ||||
|                 ;; | ||||
|             "error") | ||||
|                 # error message. Does not clear the screen | ||||
|                 # call format: message error "text to display" | ||||
|                 printf "\n$2\n\n" | ||||
|                 printf "\n%s\n\n" "$2" | ||||
|                 read -n 1 -s -p "Press any key..." | ||||
|                 ;; | ||||
|             "question") | ||||
|                 # question | ||||
|                 # call format: if message question "question to ask?"; then... | ||||
|                 printf "\n$2\n" | ||||
|                 printf "\n%s\n" "$2" | ||||
|                 while read -p "[y/n]: " yn; do | ||||
|                     case "$yn" in | ||||
|                         [Yy]*) | ||||
| @@ -392,7 +392,7 @@ message() { | ||||
|             "options") | ||||
|                 # Choose from two options | ||||
|                 # call format: if message options left_button_name right_button_name "which one do you want?"; then... | ||||
|                 printf "\n$4\n1: $3\n2: $2\n" | ||||
|                 printf "\n%s\n1: %s\n2: %s\n" "$4" "$3" "$2" | ||||
|                 while read -p "[1/2]: " option; do | ||||
|                     case "$option" in | ||||
|                         1*) | ||||
| @@ -580,7 +580,7 @@ menu() { | ||||
|     else | ||||
|         # Use a text menu if Zenity is not available | ||||
|         clear | ||||
|         printf "\n$menu_text_terminal\n\n" | ||||
|         printf "\n%s\n\n" "$menu_text_terminal" | ||||
|  | ||||
|         PS3="Enter selection number: " | ||||
|         select choice in "${menu_options[@]}" | ||||
| @@ -725,7 +725,7 @@ getdirs() { | ||||
|                     game_path="$wine_prefix/$default_install_path/$sc_base_dir" | ||||
|                 else | ||||
|                     printf "\nUnable to detect the default game install path!\nDid you change the install location in the RSI Setup?\nDoing that is generally a bad idea but, if you are sure you want to proceed...\n\n" | ||||
|                     printf "Enter the full path to your $sc_base_dir installation directory (case sensitive)\n" | ||||
|                     printf "Enter the full path to your %s installation directory (case sensitive)\n" "$sc_base_dir" | ||||
|                     printf "ie. /home/USER/Games/star-citizen/drive_c/Program Files/Roberts Space Industries/StarCitizen\n" | ||||
|                     while read -rp ": " game_path; do | ||||
|                         if [ ! -d "$game_path" ]; then | ||||
| @@ -2812,7 +2812,7 @@ Usage: lug-helper <options> | ||||
|                 exit 0 | ||||
|                 ;; | ||||
|             * ) | ||||
|                 printf "$0: Invalid option '%s'\n" "$1" | ||||
|                 printf "%s: Invalid option '%s'\n" "$0" "$1" | ||||
|                 exit 0 | ||||
|                 ;; | ||||
|         esac | ||||
|   | ||||
		Reference in New Issue
	
	Block a user