mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Fix -s/-t flags still downloading isos (#846)
* Fix -s/-t flags * Update quickget * Typo
This commit is contained in:
		
							parent
							
								
									7a724e43f3
								
							
						
					
					
						commit
						961a8a1820
					
				
					 1 changed files with 19 additions and 14 deletions
				
			
		
							
								
								
									
										29
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										29
									
								
								quickget
									
										
									
									
									
								
							|  | @ -916,26 +916,24 @@ function web_get() { | ||||||
|       exit 1 |       exit 1 | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     if command -v aria2c &>/dev/null; then | 	# Test mode for ISO | ||||||
|  | 	if [ "${show_iso_url}" == 'on' ]; then | ||||||
|  | 	    echo "${URL}" | ||||||
|  | 	    exit 0 | ||||||
|  |     elif [ "${test_iso_url}" == 'on' ]; then | ||||||
|  | 	    wget --spider "${URL}" | ||||||
|  | 	    exit 0 | ||||||
|  |     elif command -v aria2c &>/dev/null; then | ||||||
|         if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then |         if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then | ||||||
|           echo #Necessary as aria2c in suppressed mode does not have new lines |           echo #Necessary as aria2c in suppressed mode does not have new lines | ||||||
|           echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." |           echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." | ||||||
|           exit 1 |           exit 1 | ||||||
|         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) |     elif ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then | ||||||
|     elif [ "${show_iso_url}" == 'on' ]; then |  | ||||||
|           echo "${URL}" |  | ||||||
|           exit 0 |  | ||||||
|     elif [ "${test_iso_url}" == 'on' ]; then |  | ||||||
|           wget --spider "${URL}" |  | ||||||
|           exit 0 |  | ||||||
|     else |  | ||||||
|         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." | ||||||
|         exit 1 |         exit 1 | ||||||
|     fi |     fi | ||||||
|     fi |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function zsync_get() { | function zsync_get() { | ||||||
|  | @ -944,7 +942,14 @@ function zsync_get() { | ||||||
|     local OUT="" |     local OUT="" | ||||||
|     local URL="${1}" |     local URL="${1}" | ||||||
| 
 | 
 | ||||||
|     if command -v zsync &>/dev/null; then | 	# Test mode for ISO | ||||||
|  | 	if [ "${show_iso_url}" == 'on' ]; then | ||||||
|  | 	    echo "${URL}" | ||||||
|  | 	    exit 0 | ||||||
|  |     elif [ "${test_iso_url}" == 'on' ]; then | ||||||
|  | 	    wget --spider "${URL}" | ||||||
|  | 	    exit 0 | ||||||
|  |     elif command -v zsync &>/dev/null; then | ||||||
|         if [ -n "${3}" ]; then |         if [ -n "${3}" ]; then | ||||||
|             OUT="${3}" |             OUT="${3}" | ||||||
|         else |         else | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue