mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Refactor openSUSE support
This commit is contained in:
		
							parent
							
								
									9b1dba263b
								
							
						
					
					
						commit
						20b7478f31
					
				
					 1 changed files with 18 additions and 22 deletions
				
			
		
							
								
								
									
										40
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										40
									
								
								quickget
									
										
									
									
									
								
							|  | @ -87,10 +87,10 @@ function releases_linuxmint(){ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function releases_opensuse(){ | function releases_opensuse(){ | ||||||
|     echo 15_0 \ |     echo 15.0 \ | ||||||
|     15_1 \ |     15.1 \ | ||||||
|     15_2 \ |     15.2 \ | ||||||
|     15_3 \ |     15.3 \ | ||||||
|     microos \ |     microos \ | ||||||
|     tumbleweed |     tumbleweed | ||||||
| } | } | ||||||
|  | @ -575,30 +575,26 @@ function get_linuxmint() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_opensuse() { | function get_opensuse() { | ||||||
|     # For future releases, use dvd1 iso files. |     local ISO="" | ||||||
|  |     local RELEASES="" | ||||||
|     local URL="" |     local URL="" | ||||||
|     local DL_BASE="https://download.opensuse.org/" |  | ||||||
|     local VERSION="" |  | ||||||
| 
 | 
 | ||||||
|     case ${RELEASE} in |     RELEASES=$(releases_opensuse) | ||||||
|         15_0|15_1|15_2|15_3|tumbleweed|microos) VERSION=${RELEASE//_/.};; |     if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then | ||||||
|         *) |         echo "ERROR! openSUSE ${RELEASE} is not a supported release." | ||||||
|             echo "ERROR! openSUSE ${RELEASE} is not a supported release." |         echo "${RELEASES}" | ||||||
|             releases_opensuse |         exit 1 | ||||||
|             exit 1 |     fi | ||||||
|             ;; |  | ||||||
|     esac |  | ||||||
| 
 | 
 | ||||||
|     if [ "${VERSION}" == "tumbleweed" ]; then |     if [ "${RELEASE}" == "tumbleweed" ]; then | ||||||
|         ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" |         ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" | ||||||
|         URL="${DL_BASE}/tumbleweed/iso/${ISO}" |         URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" | ||||||
|     elif |     elif [ "${RELEASE}" == "microos" ]; then | ||||||
|         [ "${VERSION}" == "microos" ]; then |  | ||||||
|         ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" |         ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" | ||||||
|         URL="${DL_BASE}/tumbleweed/iso/${ISO}" |         URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" | ||||||
|     else |     else | ||||||
|         ISO="openSUSE-Leap-${VERSION}-DVD-x86_64.iso" |         ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" | ||||||
|         URL="${DL_BASE}/distribution/leap/${VERSION}/iso/${ISO}" |         URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" | ||||||
|     fi |     fi | ||||||
|     make_vm_dir |     make_vm_dir | ||||||
|     web_get "${URL}" "${VM_PATH}" |     web_get "${URL}" "${VM_PATH}" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue