mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	show_iso_url test_iso_url open_distro_homepage
This commit is contained in:
		
							parent
							
								
									58e69834cb
								
							
						
					
					
						commit
						75b97b4294
					
				
					 1 changed files with 27 additions and 11 deletions
				
			
		
							
								
								
									
										26
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								quickget
									
										
									
									
									
								
							|  | @ -25,8 +25,8 @@ function cleanup() { | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| if [ "${1}" == '-t' ]; then | if [ "${1}" == '--test-iso-url' ]; then | ||||||
|   testmode="on" |     test_iso_url="on" | ||||||
|     if [ -n "$4" ]; then |     if [ -n "$4" ]; then | ||||||
|         set -- "$2" "$3" "$4" |         set -- "$2" "$3" "$4" | ||||||
|     elif [ -n "$3" ]; then |     elif [ -n "$3" ]; then | ||||||
|  | @ -34,6 +34,18 @@ if [ "${1}" == '-t' ]; then | ||||||
|     else |     else | ||||||
|         set -- "$2" |         set -- "$2" | ||||||
|     fi |     fi | ||||||
|  | elif [ "${1}" == '--show-iso-url' ]; then | ||||||
|  |     show_iso_url="on" | ||||||
|  |     if [ -n "$4" ]; then | ||||||
|  |         set -- "$2" "$3" "$4" | ||||||
|  |     elif [ -n "$3" ]; then | ||||||
|  |         set -- "$2" "$3" | ||||||
|  |     else | ||||||
|  |         set -- "$2" | ||||||
|  |     fi | ||||||
|  | elif [ "${1}" == '--open-distro-homepage' ]; then | ||||||
|  |     open_distro_homepage="on" | ||||||
|  |     set -- "$2" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| function pretty_name() { | function pretty_name() { | ||||||
|  | @ -861,10 +873,14 @@ function web_get() { | ||||||
|         fi |         fi | ||||||
|         echo #Necessary as aria2c in suppressed mode does not have new lines |         echo #Necessary as aria2c in suppressed mode does not have new lines | ||||||
| # Test mode for ISO (yet wget only) | # Test mode for ISO (yet wget only) | ||||||
|     elif [ "${testmode}" == 'on' ]; then |     elif [ "${show_iso_url}" == 'on' ]; then | ||||||
|           echo "${URL}" |           echo "${URL}" | ||||||
|           #wget --spider "${URL}" |           exit 0 | ||||||
|           exit 1 |     elif [ "${test_iso_url}" == 'on' ]; then | ||||||
|  |           wget --spider "${URL}" | ||||||
|  |           exit 0 | ||||||
|  |     elif [ "${open_distro_homepage}" == 'on' ]; then | ||||||
|  |           xdgopen "${distro_homepage}" && exit 0 | ||||||
|     else |     else | ||||||
|         if ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then |         if ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then | ||||||
|           echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again." |           echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again." | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue