mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Make dragonfly releases dynamic
Also support their .bz2 compressed isos, giving access to all releases back to 2017. Removing (or making optional) the .bz2 in the search will just return the current iso
This commit is contained in:
		
							parent
							
								
									ecdfa193a3
								
							
						
					
					
						commit
						4d712e440c
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		
							
								
								
									
										14
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								quickget
									
										
									
									
									
								
							|  | @ -298,7 +298,10 @@ function releases_devuan() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function releases_dragonflybsd() { | function releases_dragonflybsd() { | ||||||
|     echo 6.4.0 |     # If you remove "".bz2" from the end of the searched URL, you will get only the current release - currently 6.4.0 | ||||||
|  |     # We could add a variable so this behaviour is optional/switchable (maybe from option or env) | ||||||
|  |     DBSD_RELEASES=$(curl -sL  http://mirror-master.dragonflybsd.org/iso-images/| grep -E -o '\"dfly-x86_64-.*_REL.iso.bz2\"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' ) | ||||||
|  |     echo $DBSD_RELEASES | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function releases_elementary() { | function releases_elementary() { | ||||||
|  | @ -1089,7 +1092,7 @@ function get_devuan() { | ||||||
| 
 | 
 | ||||||
| function get_dragonflybsd() { | function get_dragonflybsd() { | ||||||
|     local HASH="" |     local HASH="" | ||||||
|     local ISO="dfly-x86_64-${RELEASE}_REL.iso" |     local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2" | ||||||
|     local URL="http://mirror-master.dragonflybsd.org/iso-images" |     local URL="http://mirror-master.dragonflybsd.org/iso-images" | ||||||
| 
 | 
 | ||||||
|     HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) |     HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) | ||||||
|  | @ -2052,6 +2055,13 @@ create_vm() { | ||||||
|         ISO="${ISO/.gz/}" |         ISO="${ISO/.gz/}" | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|  |     #  Could be other OS iso files compressed with bzip2 or gzip | ||||||
|  |     #  but for now we'll keep this to know cases | ||||||
|  |     if [[ ${OS} == "dragonflybsd" ]] && [[ ${ISO} =~ ".bz2" ]]; then | ||||||
|  |         bzip2 -d  "${VM_PATH}/${ISO}" | ||||||
|  |         ISO="${ISO/.bz2/}" | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|     if [ ${OS} == "reactos" ] && [[ $ISO =~ ".zip" ]]; then |     if [ ${OS} == "reactos" ] && [[ $ISO =~ ".zip" ]]; then | ||||||
|         unzip ${VM_PATH}/${ISO} -d ${VM_PATH} |         unzip ${VM_PATH}/${ISO} -d ${VM_PATH} | ||||||
|         ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip') |         ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue