mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Garuda support added (#197)
* Support for Garuda * remove debugging * more debug removal * damn intellisense typo de-autocorrected * whitespace * more fun finding patterns that work * enabled zsync for Garuda (#5)
This commit is contained in:
		
							parent
							
								
									b44d6228ce
								
							
						
					
					
						commit
						854226bd50
					
				
					 2 changed files with 67 additions and 1 deletions
				
			
		|  | @ -33,8 +33,8 @@ comprehensive support for macOS and Windows**. | ||||||
|   * [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** |   * [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** | ||||||
|   * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) |   * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) | ||||||
|   * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) |   * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) | ||||||
|  |   * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) | ||||||
|   * [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release  ) |   * [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release  ) | ||||||
|   * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) |  | ||||||
|   * [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/) |   * [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/) | ||||||
|   * Full SPICE support including host/guest clipboard sharing |   * Full SPICE support including host/guest clipboard sharing | ||||||
|   * VirtIO-webdavd file sharing for Linux and Windows guests |   * VirtIO-webdavd file sharing for Linux and Windows guests | ||||||
|  | @ -172,6 +172,7 @@ preferred flavour. | ||||||
|   * `archlinux` |   * `archlinux` | ||||||
|   * `elementary` |   * `elementary` | ||||||
|   * `fedora` |   * `fedora` | ||||||
|  |   * `garuda` | ||||||
|   * `kali` |   * `kali` | ||||||
|   * `linuxmint-cinnamon` |   * `linuxmint-cinnamon` | ||||||
|   * `linuxmint-mate` |   * `linuxmint-mate` | ||||||
|  |  | ||||||
							
								
								
									
										65
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										65
									
								
								quickget
									
										
									
									
									
								
							|  | @ -38,6 +38,7 @@ function pretty_name() { | ||||||
|     archlinux)          PRETTY_NAME="Arch Linux";; |     archlinux)          PRETTY_NAME="Arch Linux";; | ||||||
|     elementary)         PRETTY_NAME="elementary OS";; |     elementary)         PRETTY_NAME="elementary OS";; | ||||||
|     freebsd)            PRETTY_NAME="FreeBSD";; |     freebsd)            PRETTY_NAME="FreeBSD";; | ||||||
|  |     garuda)             PRETTY_NAME="Garuda Linux";; | ||||||
|     kdeneon)            PRETTY_NAME="KDE Neon";; |     kdeneon)            PRETTY_NAME="KDE Neon";; | ||||||
|     linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; |     linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; | ||||||
|     linuxmint-mate)     PRETTY_NAME="Linux Mint MATE";; |     linuxmint-mate)     PRETTY_NAME="Linux Mint MATE";; | ||||||
|  | @ -108,6 +109,8 @@ function list_csv() { | ||||||
|         DOWNLOADER="zsync" |         DOWNLOADER="zsync" | ||||||
|       elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then |       elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then | ||||||
|         DOWNLOADER="zsync" |         DOWNLOADER="zsync" | ||||||
|  |       elif [ "${OS}" == "garuda" ]; then | ||||||
|  |         DOWNLOADER="zsync"       | ||||||
|       elif [[ "${OS}" == *"kdeneon"* ]]; then |       elif [[ "${OS}" == *"kdeneon"* ]]; then | ||||||
|         DOWNLOADER="zsync" |         DOWNLOADER="zsync" | ||||||
|       else |       else | ||||||
|  | @ -136,6 +139,7 @@ function os_support() { | ||||||
|     elementary \ |     elementary \ | ||||||
|     freebsd \ |     freebsd \ | ||||||
|     fedora \ |     fedora \ | ||||||
|  |     garuda \ | ||||||
|     kali \ |     kali \ | ||||||
|     kdeneon \ |     kdeneon \ | ||||||
|     kubuntu \ |     kubuntu \ | ||||||
|  | @ -193,6 +197,23 @@ function releases_fedora(){ | ||||||
|     35 |     35 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | function releases_garuda() { | ||||||
|  |     echo bspwm \ | ||||||
|  |     dr460nized \ | ||||||
|  |     dr460nized-blackarch \ | ||||||
|  |     dr460nized-gaming \ | ||||||
|  |     gnome \ | ||||||
|  |     i3 \ | ||||||
|  |     kde-barebones \ | ||||||
|  |     lxqt-kwin \ | ||||||
|  |     qtile \ | ||||||
|  |     sway \ | ||||||
|  |     wayfire \ | ||||||
|  |     xfce \ | ||||||
|  |     mate \ | ||||||
|  |     cinnamon | ||||||
|  | } | ||||||
|  | 
 | ||||||
| function releases_kali() { | function releases_kali() { | ||||||
|     echo latest \ |     echo latest \ | ||||||
|     weekly |     weekly | ||||||
|  | @ -628,6 +649,9 @@ function make_vm_config() { | ||||||
|     elif [ "${OS}" == "kali" ]; then |     elif [ "${OS}" == "kali" ]; then | ||||||
|         GUEST="linux" |         GUEST="linux" | ||||||
|         IMAGE_TYPE="iso" |         IMAGE_TYPE="iso" | ||||||
|  |     elif [ "${OS}" == "garuda" ]; then | ||||||
|  |         GUEST="linux" | ||||||
|  |         IMAGE_TYPE="iso"     | ||||||
|     elif [ "${OS}" == "kdeneon" ]; then |     elif [ "${OS}" == "kdeneon" ]; then | ||||||
|         GUEST="linux" |         GUEST="linux" | ||||||
|         IMAGE_TYPE="iso" |         IMAGE_TYPE="iso" | ||||||
|  | @ -687,6 +711,8 @@ EOF | ||||||
|         if [ "${OS}" == "macos" ]; then |         if [ "${OS}" == "macos" ]; then | ||||||
|             echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf" |             echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf" | ||||||
|         fi |         fi | ||||||
|  |         if [ "${OS}" == "garuda"  ]; then | ||||||
|  |             echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" | ||||||
|         if [ "${OS}" == "zorin"  ]; then |         if [ "${OS}" == "zorin"  ]; then | ||||||
|             case  ${RELEASE} in |             case  ${RELEASE} in | ||||||
|               15education64|15edulite64|15edulite32) |               15education64|15edulite64|15edulite32) | ||||||
|  | @ -1136,6 +1162,41 @@ function get_ubuntu() { | ||||||
|         make_vm_config "${ISO}" |         make_vm_config "${ISO}" | ||||||
|     fi |     fi | ||||||
| } | } | ||||||
|  | function get_garuda() { | ||||||
|  |     local HASH="" | ||||||
|  |     local ISO="" | ||||||
|  |     local URL="" | ||||||
|  |     local REL_TYPE="" | ||||||
|  |     local LATEST_URL="" | ||||||
|  |     local HASH_URL="" | ||||||
|  |     local GLDL="http://mirrors.fossho.st/garuda/iso" | ||||||
|  | 
 | ||||||
|  |     validate_release "releases_garuda" | ||||||
|  | 
 | ||||||
|  |     # Part of the path is different for a couple of community releases vs the supported garuda ones | ||||||
|  |     case ${RELEASE} in | ||||||
|  |       mate|cinnamon) | ||||||
|  |         REL_TYPE="community";; | ||||||
|  |       *) | ||||||
|  |         REL_TYPE="garuda";; | ||||||
|  |     esac | ||||||
|  | 
 | ||||||
|  |     # need to follow daily releases and use contents of SHA sums file | ||||||
|  |     # to derive the filename and date | ||||||
|  |     LATEST_URL="${GLDL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" | ||||||
|  |     HASH_URL="$(wget -q -O- ${LATEST_URL})" | ||||||
|  |     ISO="$(echo ${HASH_URL} | awk '{print $NF}' )" | ||||||
|  |     HASH=$(echo ${HASH_URL} | cut -d\  -f1) | ||||||
|  |     LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) #  | ||||||
|  |     URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}" | ||||||
|  | 
 | ||||||
|  |     #web_get "${URL}/${ISO}" "${VM_PATH}" | ||||||
|  |     zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-${RELEASE}.iso" | ||||||
|  |     #if [ -n "${HASH}" ]; then | ||||||
|  |     #  check_hash "${ISO}" "${HASH}" | ||||||
|  |     #fi | ||||||
|  |     make_vm_config "${OS}-${RELEASE}.iso" | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb | # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb | ||||||
| function get_windows() { | function get_windows() { | ||||||
|  | @ -1251,6 +1312,8 @@ if [ -n "${2}" ]; then | ||||||
|         get_freebsd |         get_freebsd | ||||||
|     elif [ "${OS}" == "fedora" ]; then |     elif [ "${OS}" == "fedora" ]; then | ||||||
|         get_fedora |         get_fedora | ||||||
|  |     elif [ "${OS}" == "garuda" ]; then | ||||||
|  |         get_garuda | ||||||
|     elif [ "${OS}" == "kali" ]; then |     elif [ "${OS}" == "kali" ]; then | ||||||
|         get_kali |         get_kali | ||||||
|     elif [ "${OS}" == "kdeneon" ]; then |     elif [ "${OS}" == "kdeneon" ]; then | ||||||
|  | @ -1332,6 +1395,8 @@ else | ||||||
|         releases_freebsd |         releases_freebsd | ||||||
|     elif [ "${OS}" == "fedora" ]; then |     elif [ "${OS}" == "fedora" ]; then | ||||||
|         releases_fedora |         releases_fedora | ||||||
|  |     elif [ "${OS}" == "garuda" ]; then | ||||||
|  |         releases_garuda | ||||||
|     elif [ "${OS}" == "kali" ]; then |     elif [ "${OS}" == "kali" ]; then | ||||||
|         releases_kali |         releases_kali | ||||||
|     elif [[ "${OS}" == *"linuxmint-"* ]]; then |     elif [[ "${OS}" == *"linuxmint-"* ]]; then | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue