forked from CastroFidel/winehelper
		
	Merge branch 'minergenon-cancel_prefix'
This commit is contained in:
		
							
								
								
									
										16
									
								
								winehelper
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								winehelper
									
									
									
									
									
								
							| @@ -903,17 +903,25 @@ check_prefix_var () { | |||||||
|         for prefix in "$WH_PREFIXES_DIR"/* ; do |         for prefix in "$WH_PREFIXES_DIR"/* ; do | ||||||
|             if [[ -d "$prefix" ]]; then |             if [[ -d "$prefix" ]]; then | ||||||
|                 prefixes+=("$prefix") |                 prefixes+=("$prefix") | ||||||
|                 echo "$count. $(basename "$prefix")" |  | ||||||
|                 ((count++)) |                 ((count++)) | ||||||
|             fi |             fi | ||||||
|         done |         done | ||||||
|  |  | ||||||
|         [[ ${#prefixes[@]} -eq 0 ]] && fatal "Не найдено ни одного префикса!" |         [[ ${#prefixes[@]} -eq 0 ]] && fatal "Не найдено ни одного префикса!" | ||||||
|  |  | ||||||
|         local max_choice=${#prefixes[@]} |         echo "0 - Отмена" | ||||||
|         read -p "Выберите префикс (1-$max_choice): " choice |  | ||||||
|  |  | ||||||
|         if [[ "$choice" -ge 1 && "$choice" -le "$max_choice" ]] ; then |         for ((i=0; i<${#prefixes[@]}; i++)); do | ||||||
|  |             echo "$((i+1)) - $(basename "${prefixes[$i]}")" | ||||||
|  |         done | ||||||
|  |  | ||||||
|  |         local max_choice=${#prefixes[@]} | ||||||
|  |         read -p "Выберите префикс (0-$max_choice): " choice | ||||||
|  |  | ||||||
|  |         if [[ "$choice" == "0" ]]; then | ||||||
|  |             print_info "Выбор префикса отменен." | ||||||
|  |             exit 0 | ||||||
|  |         elif [[ "$choice" -ge 1 && "$choice" -le "$max_choice" ]] ; then | ||||||
|             export WINEPREFIX="${prefixes[$choice-1]}" |             export WINEPREFIX="${prefixes[$choice-1]}" | ||||||
|         else |         else | ||||||
|             fatal "Неверный выбор." |             fatal "Неверный выбор." | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user