Title: Fix downloader selection logic in zrep script
- Fixed logical OR conditions to logical AND in downloader selection. - Improved user input validation for downloader selection. - Added error messages for invalid downloader choices. - Updated zrep script for correct downloader selection logic.
This commit is contained in:
		
							
								
								
									
										4
									
								
								zrep
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								zrep
									
									
									
									
									
								
							| @@ -153,10 +153,10 @@ function zrep_init() { | |||||||
|         read "install_dir?Enter zrep installation directory [${HOME}/.zrep]: " |         read "install_dir?Enter zrep installation directory [${HOME}/.zrep]: " | ||||||
|         install_dir=${install_dir:-"${HOME}/.zrep"} |         install_dir=${install_dir:-"${HOME}/.zrep"} | ||||||
|         read "downloader?Choose command to download packages [curl, wget, wget2]: " |         read "downloader?Choose command to download packages [curl, wget, wget2]: " | ||||||
|         if [[ ${downloader} != curl || ${downloader} != wget || ${downloader} != wget2 ]]; then |         if [[ ${downloader} != curl && ${downloader} != wget && ${downloader} != wget2 ]]; then | ||||||
|             echo "Invalid choice: '$downloader'. Try again." |             echo "Invalid choice: '$downloader'. Try again." | ||||||
|             read "downloader?Choose command to download packages [curl, wget, wget2] " |             read "downloader?Choose command to download packages [curl, wget, wget2] " | ||||||
|             if [[ ${downloader} != curl || ${downloader} != wget || ${downloader} != wget2 ]]; then |             if [[ ${downloader} != curl && ${downloader} != wget && ${downloader} != wget2 ]]; then | ||||||
|                 echo "Invalid choice: '$downloader'. Exiting." |                 echo "Invalid choice: '$downloader'. Exiting." | ||||||
|                 exit |                 exit | ||||||
|             fi |             fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user