Don't use wget --show-progress if it's not available
This commit is contained in:
		
							parent
							
								
									93ba3d8796
								
							
						
					
					
						commit
						0bcdb8a675
					
				
					 2 changed files with 4 additions and 1 deletions
				
			
		|  | @ -26,6 +26,9 @@ else | ||||||
| 	distrib="unknown" | 	distrib="unknown" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | # Initializes $wget_progress: detects if the option --show-progress is available | ||||||
|  | wget --help | grep -q '\--show-progress' && wget_progress="-q --show-progress" || wget_progress="" | ||||||
|  | 
 | ||||||
| # ask_yesno question | # ask_yesno question | ||||||
| ## Asks a yes/no question and stores the result in the 'answer' variable | ## Asks a yes/no question and stores the result in the 'answer' variable | ||||||
| ask_yesno() { | ask_yesno() { | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ fi | ||||||
| # Downloads the discord tar.gz archive and puts its name in the global variable archive_name. | # Downloads the discord tar.gz archive and puts its name in the global variable archive_name. | ||||||
| download_discord() { | download_discord() { | ||||||
| 	echo "Downloading $app_name for linux..." | 	echo "Downloading $app_name for linux..." | ||||||
| 	wget -q --show-progress --content-disposition "${download_url}?platform=linux&format=tar.gz" | 	wget $wget_progress --content-disposition "${download_url}?platform=linux&format=tar.gz" | ||||||
| 	archive_name="$(ls *.tar.gz)" | 	archive_name="$(ls *.tar.gz)" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 TheElectronWill
						TheElectronWill