mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Refactor web_get() and add progress
This commit is contained in:
		
							parent
							
								
									3a86f6c2dd
								
							
						
					
					
						commit
						0dcbe75fb5
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		
							
								
								
									
										10
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -5,12 +5,10 @@ function web_get() { | ||||||
|   local URL="${1}" |   local URL="${1}" | ||||||
|   local FILE="" |   local FILE="" | ||||||
|   FILE="${URL##*/}" |   FILE="${URL##*/}" | ||||||
|   if [ ! -e "${VMDIR}/${FILE}" ]; then |   mkdir -p "${VMDIR}" 2>/dev/null | ||||||
|     mkdir -p "${VMDIR}" 2>/dev/null |   if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${VMDIR}/${FILE}"; then | ||||||
|     if ! wget -q -c "${URL}" -O "${VMDIR}/${FILE}"; then |     echo "ERROR! Failed to download ${URL}" | ||||||
|       echo "ERROR! Failed to download ${URL}" |     exit 1 | ||||||
|       exit 1 |  | ||||||
|     fi |  | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue