mirror of
				https://github.com/dockur/windows.git
				synced 2025-10-30 20:45:50 +00:00 
			
		
		
		
	Update install.sh
This commit is contained in:
		
							parent
							
								
									c6c487639e
								
							
						
					
					
						commit
						e33cb688c9
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		|  | @ -293,20 +293,18 @@ verifyFile() { | |||
|   local check="$2" | ||||
|   local hash="" | ||||
| 
 | ||||
|   [ -z "$check" ] && return 0 | ||||
| 
 | ||||
|   html "Verifying downloaded ISO..." | ||||
|   info "Calculating SHA256 checksum of the ISO file..." | ||||
| 
 | ||||
|   hash=$(sha256sum "$iso" | cut -f1 -d' ') | ||||
| 
 | ||||
|   if [ -z "$check" ]; then | ||||
|     info "The sha256 checksum is: $hash , but have no value available for comparison." && return 0 | ||||
|   fi | ||||
| 
 | ||||
|   if [[ "$hash" == "$check" ]]; then | ||||
|     info "Succesfully verified that the checksum was correct!" && return 0 | ||||
|   fi | ||||
| 
 | ||||
|   error "Invalid sha256 checksum: $hash , expected value is: $check" | ||||
|   error "Invalid sha256 checksum: $hash , but expected value is: $check" | ||||
| 
 | ||||
|   rm -f "$iso" | ||||
|   return 1 | ||||
|  | @ -348,7 +346,7 @@ downloadFile() { | |||
| 
 | ||||
|   if (( rc == 0 )) && [ -f "$iso" ]; then | ||||
|     if [ "$(stat -c%s "$iso")" -gt 100000000 ]; then | ||||
|       if [[ "$VERIFY" == [Yy1]* ]]; then | ||||
|       if [[ "$VERIFY" == [Yy1]* ]] && [ -n "$sum" ]; then | ||||
|         ! verifyFile "$iso" "$sum" && return 1 | ||||
|       fi | ||||
|       html "Download finished successfully..." && return 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kroese
						Kroese