mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Merge branch 'master' into master
This commit is contained in:
		
						commit
						b3edcfcc1c
					
				
					 3 changed files with 626 additions and 281 deletions
				
			
		
							
								
								
									
										738
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										738
									
								
								quickget
									
										
									
									
									
								
							|  | @ -1,5 +1,6 @@ | |||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| 
 | ||||
| # Here the quick 'n dirty guide to adding a new OS to quickget | ||||
| # | ||||
| #  1. Add the new OS, all lowercase, to os_support() | ||||
|  | @ -25,7 +26,7 @@ | |||
| 
 | ||||
| function cleanup() { | ||||
|   if [ -n "$(jobs -p)" ]; then | ||||
|     kill $(jobs -p) | ||||
|     kill "$(jobs -p)" | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
|  | @ -34,6 +35,7 @@ function pretty_name() { | |||
|   local PRETTY_NAME="" | ||||
|   SIMPLE_NAME="${1}" | ||||
|   case ${SIMPLE_NAME} in | ||||
|     alma)               PRETTY_NAME="Alma Linux";; | ||||
|     android)            PRETTY_NAME="Android x86";; | ||||
|     archlinux)          PRETTY_NAME="Arch Linux";; | ||||
|     elementary)         PRETTY_NAME="elementary OS";; | ||||
|  | @ -50,6 +52,7 @@ function pretty_name() { | |||
|     macos)              PRETTY_NAME="macOS";; | ||||
|     openbsd)            PRETTY_NAME="OpenBSD";; | ||||
|     opensuse)           PRETTY_NAME="openSUSE";; | ||||
|     oraclelinux)        PRETTY_NAME="Oracle Linux";; | ||||
|     popos)              PRETTY_NAME="Pop!_OS";; | ||||
|     regolith)           PRETTY_NAME="Regolith Linux";; | ||||
|     rockylinux)         PRETTY_NAME="Rocky Linux";; | ||||
|  | @ -143,6 +146,14 @@ function list_csv() { | |||
|         for OPTION in intel nvidia; do | ||||
|           echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" | ||||
|         done | ||||
|       elif [ "${OS}" == "debian" ]; then | ||||
|         for OPTION in standard nonfree; do | ||||
|          echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" | ||||
|         done | ||||
|       elif [ "${OS}" == "alma" ]; then | ||||
|         for OPTION in minimal dvd; do | ||||
|           echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" | ||||
|         done | ||||
|       else | ||||
|         echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" | ||||
|       fi | ||||
|  | @ -152,8 +163,10 @@ function list_csv() { | |||
| } | ||||
| 
 | ||||
| function os_support() { | ||||
|     echo android \ | ||||
|     echo alma \ | ||||
|     android \ | ||||
|     archlinux \ | ||||
|     debian \ | ||||
|     elementary \ | ||||
|     freebsd \ | ||||
|     fedora \ | ||||
|  | @ -172,6 +185,7 @@ function os_support() { | |||
|     macos \ | ||||
|     openbsd \ | ||||
|     opensuse \ | ||||
|     oraclelinux \ | ||||
|     popos \ | ||||
|     regolith \ | ||||
|     rockylinux \ | ||||
|  | @ -186,6 +200,12 @@ function os_support() { | |||
|     zorin | ||||
| } | ||||
| 
 | ||||
| function releases_alma() { | ||||
|     # consider flavours for boot and dvd as well as | ||||
|     echo 8.4 \ | ||||
|     8.5 | ||||
| } | ||||
| 
 | ||||
| function releases_android() { | ||||
|   echo 9.0 \ | ||||
|   8.1 \ | ||||
|  | @ -201,6 +221,19 @@ function releases_archlinux() { | |||
|     echo latest | ||||
| } | ||||
| 
 | ||||
| # later refactor these DE variants like languages and avoid the arch ? | ||||
| # all these are available with a "nonfree" option too | ||||
| function releases_debian() { | ||||
|     echo 11.1.0-amd64-cinnamon \ | ||||
|     11.1.0-amd64-gnome \ | ||||
|     11.1.0-amd64-kde \ | ||||
|     11.1.0-amd64-lxde \ | ||||
|     11.1.0-amd64-lxqt \ | ||||
|     11.1.0-amd64-mate \ | ||||
|     11.1.0-amd64-standard \ | ||||
|     11.1.0-amd64-xfce | ||||
| } | ||||
| 
 | ||||
| function releases_elementary() { | ||||
|     echo 6.0 | ||||
| } | ||||
|  | @ -254,7 +287,8 @@ function releases_linuxmint(){ | |||
| } | ||||
| 
 | ||||
| function releases_nixos(){ | ||||
|     echo 21.05 | ||||
|     echo 21.05 \ | ||||
|     21.11 | ||||
| } | ||||
| 
 | ||||
| function releases_openbsd(){ | ||||
|  | @ -270,6 +304,16 @@ function releases_opensuse(){ | |||
|     tumbleweed | ||||
| } | ||||
| 
 | ||||
| function releases_oraclelinux() { | ||||
|     echo 8.5 \ | ||||
|     8.4 \ | ||||
|     8.3 \ | ||||
|     8.2 \ | ||||
|     7.9 \ | ||||
|     7.8 \ | ||||
|     7.7 | ||||
| } | ||||
| 
 | ||||
| function releases_macos() { | ||||
|     echo high-sierra \ | ||||
|     mojave \ | ||||
|  | @ -373,199 +417,6 @@ function releases_zorin() { | |||
|     15edulite32 | ||||
| } | ||||
| 
 | ||||
| function unattended_windows() { | ||||
|     cat << 'EOF' > "${1}" | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <unattend xmlns="urn:schemas-microsoft-com:unattend" | ||||
|   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
| 
 | ||||
|   <!-- | ||||
|        For documentation on components: | ||||
|        http://technet.microsoft.com/en-us/library/ff699038.aspx | ||||
|   --> | ||||
| 
 | ||||
|   <settings pass="generalize"> | ||||
|     <!-- | ||||
|          The PersistAllDeviceInstalls setting indicates whether all plug and | ||||
|          play devices on the destination computer remain installed during the | ||||
|          generalize configuration pass. | ||||
|     --> | ||||
|     <component name="Microsoft-Windows-PnPSysprep" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS"> | ||||
|       <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="windowsPE"> | ||||
|     <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | ||||
|       <DiskConfiguration> | ||||
|         <Disk wcm:action="add"> | ||||
|           <DiskID>0</DiskID> | ||||
|           <WillWipeDisk>true</WillWipeDisk> | ||||
|           <CreatePartitions> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>1</Order> | ||||
|               <Type>EFI</Type> | ||||
|               <Size>100</Size> | ||||
|             </CreatePartition> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>2</Order> | ||||
|               <Type>MSR</Type> | ||||
|               <Size>512</Size> | ||||
|             </CreatePartition> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>3</Order> | ||||
|               <Type>Primary</Type> | ||||
|               <Extend>true</Extend> | ||||
|             </CreatePartition> | ||||
|           </CreatePartitions> | ||||
|           <ModifyPartitions> | ||||
|             <ModifyPartition wcm:action="add"> | ||||
|               <Order>1</Order> | ||||
|               <PartitionID>1</PartitionID> | ||||
|               <Label>System</Label> | ||||
|               <Format>FAT32</Format> | ||||
|             </ModifyPartition> | ||||
|             <ModifyPartition wcm:action="add"> | ||||
|               <Order>2</Order> | ||||
|               <PartitionID>3</PartitionID> | ||||
|               <Label>Windows</Label> | ||||
|               <Letter>C</Letter> | ||||
|               <Format>NTFS</Format> | ||||
|             </ModifyPartition> | ||||
|           </ModifyPartitions> | ||||
|         </Disk> | ||||
|         <WillShowUI>OnError</WillShowUI> | ||||
|       </DiskConfiguration> | ||||
|       <ImageInstall> | ||||
|         <OSImage> | ||||
|           <WillShowUI>OnError</WillShowUI> | ||||
|           <InstallTo> | ||||
|             <DiskID>0</DiskID> | ||||
|             <PartitionID>3</PartitionID> | ||||
|           </InstallTo> | ||||
|           </OSImage> | ||||
|       </ImageInstall> | ||||
|       <UserData> | ||||
|         <AcceptEula>true</AcceptEula> | ||||
|         <ProductKey> | ||||
|           <key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</key> | ||||
|           <WillShowUI>Never</WillShowUI> | ||||
|         </ProductKey> | ||||
|       </UserData> | ||||
|       <DynamicUpdate> | ||||
|         <Enable>true</Enable> | ||||
|         <WillShowUI>Never</WillShowUI> | ||||
|       </DynamicUpdate> | ||||
|     </component> | ||||
| 
 | ||||
|     <component name="Microsoft-Windows-PnpCustomizationsWinPE" | ||||
|       publicKeyToken="31bf3856ad364e35" language="neutral" | ||||
|       versionScope="nonSxS" processorArchitecture="amd64"> | ||||
| 
 | ||||
|       <!-- | ||||
|            This makes the VirtIO drivers available to Windows, assuming that | ||||
|            the VirtIO driver disk | ||||
|            (https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md) | ||||
|            is available as drive E: | ||||
|       --> | ||||
|       <DriverPaths> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="1"> | ||||
|           <Path>E:\qemufwcfg\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="2"> | ||||
|           <Path>E:\vioinput\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="3"> | ||||
|           <Path>E:\vioscsi\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="4"> | ||||
|           <Path>E:\viostor\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="5"> | ||||
|           <Path>E:\vioserial\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="6"> | ||||
|           <Path>E:\qxldod\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="7"> | ||||
|           <Path>E:\amd64\w10</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="8"> | ||||
|           <Path>E:\viogpudo\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="9"> | ||||
|           <Path>E:\viorng\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="10"> | ||||
|           <Path>E:\NetKVM\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="11"> | ||||
|           <Path>E:\viofs\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="12"> | ||||
|           <Path>E:\Balloon\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|       </DriverPaths> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="specialize"> | ||||
|     <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | ||||
|       <ComputerName>*</ComputerName> | ||||
|       <OEMInformation> | ||||
|         <Manufacturer>Wimpys World</Manufacturer> | ||||
|         <Model>Quickemu</Model> | ||||
|         <SupportHours>24/7</SupportHours> | ||||
|         <SupportPhone></SupportPhone> | ||||
|         <SupportProvider>Wimpys World</SupportProvider> | ||||
|         <SupportURL>https://github.com/wimpysworld/quickemu/issues</SupportURL> | ||||
|       </OEMInformation> | ||||
|       <OEMName>Wimpys World</OEMName> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="oobeSystem"> | ||||
|     <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | ||||
|       <OOBE> | ||||
|         <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> | ||||
|         <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> | ||||
|       </OOBE> | ||||
|       <FirstLogonCommands> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install Virtio Guest Agent</Description> | ||||
|           <Order>1</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install spice-webdavd file sharing agent</Description> | ||||
|           <Order>2</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install usbdk USB sharing agent</Description> | ||||
|           <Order>3</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install spice-vdagent SPICE agent</Description> | ||||
|           <Order>4</Order> | ||||
|         </SynchronousCommand> | ||||
|       </FirstLogonCommands> | ||||
|     </component> | ||||
|   </settings> | ||||
| </unattend> | ||||
| EOF | ||||
| } | ||||
| 
 | ||||
| function check_hash() { | ||||
|     local iso="" | ||||
|     local hash="" | ||||
|  | @ -667,12 +518,18 @@ function make_vm_config() { | |||
| 
 | ||||
|     IMAGE_FILE="${1}" | ||||
|     ISO_FILE="${2}" | ||||
|     if [ "${OS}" == "android" ]; then | ||||
|     if [ "${OS}" == "alma" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "android" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "archlinux" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "debian" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "elementary" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|  | @ -706,6 +563,9 @@ function make_vm_config() { | |||
|     elif [ "${OS}" == "opensuse" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "oraclelinux" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|     elif [ "${OS}" == "popos" ]; then | ||||
|         GUEST="linux" | ||||
|         IMAGE_TYPE="iso" | ||||
|  | @ -732,6 +592,11 @@ function make_vm_config() { | |||
|         IMAGE_TYPE="iso" | ||||
|     fi | ||||
| 
 | ||||
| 
 | ||||
|     if [ -n "${ISOTYPE}" ]; then | ||||
|         RELEASE=${RELEASE}-${ISOTYPE} | ||||
|     fi | ||||
| 
 | ||||
|     if [ ! -e "${OS}-${RELEASE}.conf" ]; then | ||||
|         echo "Making VM configuration for ${OS}-${RELEASE}..." | ||||
|         cat << EOF > "${OS}-${RELEASE}.conf" | ||||
|  | @ -742,7 +607,9 @@ EOF | |||
|         if [ -n "${ISO_FILE}" ]; then | ||||
|             echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf" | ||||
|         fi | ||||
| 
 | ||||
|         if [ "${OS}" == "alma"  ] && [ ${ISOTYPE} == "dvd" ]; then | ||||
|             echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" | ||||
|         fi | ||||
|         if [ "${OS}" == "openbsd" ]; then | ||||
|             echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" | ||||
|         fi | ||||
|  | @ -755,6 +622,10 @@ EOF | |||
|             echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" | ||||
|         fi | ||||
| 
 | ||||
|         if [ "${OS}" == "oraclelinux"  ]; then | ||||
|             echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" | ||||
|         fi | ||||
| 
 | ||||
|         if [ "${OS}" == "zorin"  ]; then | ||||
|             case  ${RELEASE} in | ||||
|               15education64|15edulite64|15edulite32) | ||||
|  | @ -785,16 +656,16 @@ function get_android() { | |||
|   validate_release "releases_android" | ||||
|   fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =") | ||||
|   version="android-x86-${RELEASE}" | ||||
|   releaseJson=$(echo ${fosshubVersionInfo:16} | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') | ||||
|   releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') | ||||
| 
 | ||||
|   HASH=$(echo "${releaseJson}" | jq -r .hash.sha256) | ||||
|   ISO=$(echo "${releaseJson}" | jq -r .n) | ||||
| 
 | ||||
|   baseurl="https://mirrors.gigenet.com/OSDN/android-x86/" | ||||
| 
 | ||||
|   releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E [0-9]{5} | uniq) | ||||
|   releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E '[0-9]{5}' | uniq) | ||||
|   for item in $releaseFolders; do | ||||
|     file=$(wget -O - -q ${baseurl}${item} | grep "${ISO}") | ||||
|     file=$(wget -O - -q "${baseurl}${item}" | grep "${ISO}") | ||||
|     if [[ $file != "" ]]; then | ||||
|       URL="${baseurl}${item}/${ISO}" | ||||
|       break | ||||
|  | @ -805,6 +676,33 @@ function get_android() { | |||
|   make_vm_config "${ISO}" | ||||
| } | ||||
| 
 | ||||
| function get_alma() { | ||||
|     local HASH="" | ||||
|     local ISO="" | ||||
|     local URL="" | ||||
|     local VERSION="" | ||||
|     #local isotype="" | ||||
| 
 | ||||
|     validate_release "releases_alma" | ||||
| 
 | ||||
|     ISOTYPE="minimal" # boot is a step too far for now - needs setting install source to mirror tree ... nope | ||||
|     if [ -n "${1}" ]; then | ||||
|       ISOTYPE="${1}" | ||||
|     fi | ||||
| 
 | ||||
| 
 | ||||
|     # The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing | ||||
|     # We'll just grab the first | ||||
| 
 | ||||
|     URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"<li>|</li>" '{for(i=2;i<=NF;i+=2) {print $i}}' RS=""  |grep href|cut -d\" -f2|head -1) | ||||
| 
 | ||||
|     #VM_PATH="${VM_PATH}"-${ISOTYPE} | ||||
|     ISO=AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso | ||||
|     HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \(${ISO} | cut -d\   -f4)" | ||||
|     web_get "${URL}/${ISO}" "${VM_PATH}" | ||||
|     check_hash "${ISO}" "${HASH}" | ||||
|     make_vm_config "${ISO}" | ||||
| } | ||||
| function get_archlinux() { | ||||
|     local HASH="" | ||||
|     local ISO="" | ||||
|  | @ -821,6 +719,35 @@ function get_archlinux() { | |||
|     make_vm_config "${ISO}" | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| function get_debian() { | ||||
|     local HASH="" | ||||
|     local ISO="" | ||||
|     local URL="" | ||||
|     local HASHLINE="" | ||||
|     local FREEDOM="" | ||||
| 
 | ||||
| 
 | ||||
|     validate_release "releases_debian" | ||||
| 
 | ||||
|     if [ "${1}" == "nonfree" ]; then | ||||
|       RELEASE="${RELEASE}+nonfree" | ||||
|     fi | ||||
|     case $RELEASE in | ||||
|       *+nonfree)  URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid" ;; | ||||
|       *)          URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";; | ||||
|     esac | ||||
| 
 | ||||
| 
 | ||||
|     HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso) | ||||
|     ISO="$(echo ${HASHLINE} | awk '{print $NF}' )" | ||||
|     HASH=$(echo ${HASHLINE} | cut -d\  -f1) | ||||
| 
 | ||||
|     web_get "${URL}/${ISO}" "${VM_PATH}" | ||||
|     check_hash "${ISO}" "${HASH}" | ||||
|     make_vm_config "${ISO}" | ||||
| } | ||||
| 
 | ||||
| function get_elementary() { | ||||
|     local ISO="" | ||||
|     local URL="" | ||||
|  | @ -983,8 +910,8 @@ function get_zorin() { | |||
| 
 | ||||
|     validate_release "releases_zorin" | ||||
|     # their redirector returns an href so we need to get that and parse out the iso | ||||
|     URL=$(curl -s https://zrn.co/${RELEASE} |cut -d\" -f2) | ||||
|     ISO=$(echo ${URL}| awk -F\/ ' {print $NF}') | ||||
|     URL=$(curl -s "https://zrn.co/${RELEASE}" |cut -d\" -f2) | ||||
|     ISO=$(echo "${URL}"| awk -F\/ ' {print $NF}') | ||||
|     web_get "${URL}" "${VM_PATH}" | ||||
|     make_vm_config "${ISO}" | ||||
| } | ||||
|  | @ -1056,6 +983,35 @@ function get_opensuse() { | |||
|     make_vm_config "${ISO}" | ||||
| } | ||||
| 
 | ||||
| function get_oraclelinux() { | ||||
|     local HASH="" | ||||
|     local ISO="" | ||||
|     local URL="" | ||||
| 
 | ||||
|     local arch="x86_64" | ||||
| 
 | ||||
|     validate_release "releases_oraclelinux" | ||||
| 
 | ||||
|     local majorver=${RELEASE::1} | ||||
|     local minorver=${RELEASE:2:1} | ||||
| 
 | ||||
|     local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" | ||||
|     local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum" | ||||
| 
 | ||||
|     if [ "${majorver}" == "8" ]; then | ||||
|         ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" | ||||
|     else | ||||
|         ISO="OracleLinux-R${majorver}-U${minorver}-Server-${arch}-dvd.iso" | ||||
|     fi | ||||
| 
 | ||||
|     URL="${baseurl}/${ISO}" | ||||
|     HASH=$(wget -q -O- "${hashurl}" | grep "${ISO}" | cut -d' ' -f1) | ||||
| 
 | ||||
|     web_get "${URL}" "${VM_PATH}" | ||||
|     check_hash "${ISO}" "${HASH}" | ||||
|     make_vm_config "${ISO}" | ||||
| } | ||||
| 
 | ||||
| function get_macos() { | ||||
|     local BOARD_ID="" | ||||
|     local CWD="" | ||||
|  | @ -1168,9 +1124,9 @@ function get_regolith() { | |||
|       2.0.0_hirsute) | ||||
|         URL="${URL}regolith-linux-2.0-hirsute-latest";; | ||||
|     esac | ||||
|     ISO="Regolith_"${RELEASE}".iso" | ||||
|     ISO="Regolith_${RELEASE}.iso" | ||||
|     web_get "${URL}/${ISO}" "${VM_PATH}" | ||||
|     if [ -n $HASH ]; then | ||||
|     if [ -n "${HASH}" ]; then | ||||
|       check_hash "${ISO}" "${HASH}" | ||||
|     fi | ||||
|     make_vm_config "${ISO}" | ||||
|  | @ -1249,7 +1205,7 @@ function get_garuda() { | |||
|     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) | ||||
|     HASH=$(echo "${HASH_URL}" | cut -d\  -f1) | ||||
|     LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) # | ||||
|     URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}" | ||||
| 
 | ||||
|  | @ -1261,6 +1217,309 @@ function get_garuda() { | |||
|     make_vm_config "${OS}-${RELEASE}.iso" | ||||
| } | ||||
| 
 | ||||
| function unattended_windows() { | ||||
|     cat << 'EOF' > "${1}" | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <unattend xmlns="urn:schemas-microsoft-com:unattend" | ||||
|   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|   <!-- | ||||
|        For documentation on components: | ||||
|        https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/ | ||||
|   --> | ||||
|   <settings pass="offlineServicing"> | ||||
|     <component name="Microsoft-Windows-Shell-Setup" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <ComputerName>*</ComputerName> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="generalize"> | ||||
|     <component name="Microsoft-Windows-PnPSysprep" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS"> | ||||
|       <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="specialize"> | ||||
|     <component name="Microsoft-Windows-Security-SPP-UX" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <SkipAutoActivation>false</SkipAutoActivation> | ||||
|     </component> | ||||
|     <component name="Microsoft-Windows-Shell-Setup" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <ComputerName>*</ComputerName> | ||||
|       <OEMInformation> | ||||
|         <Manufacturer>Quickemu Project</Manufacturer> | ||||
|         <Model>Quickemu</Model> | ||||
|         <SupportHours>24/7</SupportHours> | ||||
|         <SupportPhone></SupportPhone> | ||||
|         <SupportProvider>Quickemu Project</SupportProvider> | ||||
|         <SupportURL>https://github.com/quickemu-project/quickemu/issues</SupportURL> | ||||
|       </OEMInformation> | ||||
|       <OEMName>Quickemu Project</OEMName> | ||||
|     </component> | ||||
|     <component name="Microsoft-Windows-SQMApi" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <CEIPEnabled>0</CEIPEnabled> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="windowsPE"> | ||||
|     <component name="Microsoft-Windows-Setup" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <Diagnostics> | ||||
|         <OptIn>false</OptIn> | ||||
|       </Diagnostics> | ||||
|       <DiskConfiguration> | ||||
|         <Disk wcm:action="add"> | ||||
|           <DiskID>0</DiskID> | ||||
|           <WillWipeDisk>true</WillWipeDisk> | ||||
|           <CreatePartitions> | ||||
|             <!-- Windows RE Tools partition --> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>1</Order> | ||||
|               <Type>Primary</Type> | ||||
|               <Size>256</Size> | ||||
|             </CreatePartition> | ||||
|             <!-- System partition (ESP) --> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>2</Order> | ||||
|               <Type>EFI</Type> | ||||
|               <Size>128</Size> | ||||
|             </CreatePartition> | ||||
|             <!-- Microsoft reserved partition (MSR) --> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>3</Order> | ||||
|               <Type>MSR</Type> | ||||
|               <Size>128</Size> | ||||
|             </CreatePartition> | ||||
|             <!-- Windows partition --> | ||||
|             <CreatePartition wcm:action="add"> | ||||
|               <Order>4</Order> | ||||
|               <Type>Primary</Type> | ||||
|               <Extend>true</Extend> | ||||
|             </CreatePartition> | ||||
|           </CreatePartitions> | ||||
|           <ModifyPartitions> | ||||
|             <!-- Windows RE Tools partition --> | ||||
|             <ModifyPartition wcm:action="add"> | ||||
|               <Order>1</Order> | ||||
|               <PartitionID>1</PartitionID> | ||||
|               <Label>WINRE</Label> | ||||
|               <Format>NTFS</Format> | ||||
|               <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> | ||||
|             </ModifyPartition> | ||||
|             <!-- System partition (ESP) --> | ||||
|             <ModifyPartition wcm:action="add"> | ||||
|               <Order>2</Order> | ||||
|               <PartitionID>2</PartitionID> | ||||
|               <Label>System</Label> | ||||
|               <Format>FAT32</Format> | ||||
|             </ModifyPartition> | ||||
|             <!-- MSR partition does not need to be modified --> | ||||
|             <ModifyPartition wcm:action="add"> | ||||
|               <Order>3</Order> | ||||
|               <PartitionID>3</PartitionID> | ||||
|             </ModifyPartition> | ||||
|             <!-- Windows partition --> | ||||
|               <ModifyPartition wcm:action="add"> | ||||
|               <Order>4</Order> | ||||
|               <PartitionID>4</PartitionID> | ||||
|               <Label>Windows</Label> | ||||
|               <Letter>C</Letter> | ||||
|               <Format>NTFS</Format> | ||||
|             </ModifyPartition> | ||||
|           </ModifyPartitions> | ||||
|         </Disk> | ||||
|       </DiskConfiguration> | ||||
|       <DynamicUpdate> | ||||
|         <Enable>true</Enable> | ||||
|         <WillShowUI>Never</WillShowUI> | ||||
|       </DynamicUpdate> | ||||
|       <ImageInstall> | ||||
|         <OSImage> | ||||
|           <InstallTo> | ||||
|             <DiskID>0</DiskID> | ||||
|             <PartitionID>4</PartitionID> | ||||
|           </InstallTo> | ||||
|           <InstallToAvailablePartition>false</InstallToAvailablePartition> | ||||
|         </OSImage> | ||||
|       </ImageInstall> | ||||
|       <RunSynchronous> | ||||
|         <RunSynchronousCommand wcm:action="add"> | ||||
|           <Order>1</Order> | ||||
|           <Path>reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 0x00000001 /f</Path> | ||||
|         </RunSynchronousCommand> | ||||
|         <RunSynchronousCommand wcm:action="add"> | ||||
|           <Order>2</Order> | ||||
|           <Path>reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 0x00000001 /f</Path> | ||||
|         </RunSynchronousCommand> | ||||
|         <RunSynchronousCommand wcm:action="add"> | ||||
|           <Order>3</Order> | ||||
|           <Path>reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 0x00000001 /f</Path> | ||||
|         </RunSynchronousCommand> | ||||
|         <RunSynchronousCommand wcm:action="add"> | ||||
|           <Order>4</Order> | ||||
|           <Path>reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 0x00000001 /f</Path> | ||||
|         </RunSynchronousCommand> | ||||
|       </RunSynchronous> | ||||
|       <UpgradeData> | ||||
|         <Upgrade>false</Upgrade> | ||||
|         <WillShowUI>Never</WillShowUI> | ||||
|       </UpgradeData> | ||||
|       <UserData> | ||||
|         <AcceptEula>true</AcceptEula> | ||||
|         <ProductKey> | ||||
|           <key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</key> | ||||
|           <WillShowUI>Never</WillShowUI> | ||||
|         </ProductKey> | ||||
|       </UserData> | ||||
|     </component> | ||||
| 
 | ||||
|     <component name="Microsoft-Windows-PnpCustomizationsWinPE" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       processorArchitecture="amd64"> | ||||
| 
 | ||||
|       <!-- | ||||
|            This makes the VirtIO drivers available to Windows, assuming that | ||||
|            the VirtIO driver disk | ||||
|            (https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md) | ||||
|            is available as drive E: | ||||
|       --> | ||||
|       <DriverPaths> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="1"> | ||||
|           <Path>E:\qemufwcfg\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="2"> | ||||
|           <Path>E:\vioinput\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="3"> | ||||
|           <Path>E:\vioscsi\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="4"> | ||||
|           <Path>E:\viostor\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="5"> | ||||
|           <Path>E:\vioserial\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="6"> | ||||
|           <Path>E:\qxldod\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="7"> | ||||
|           <Path>E:\amd64\w10</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="8"> | ||||
|           <Path>E:\viogpudo\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="9"> | ||||
|           <Path>E:\viorng\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="10"> | ||||
|           <Path>E:\NetKVM\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="11"> | ||||
|           <Path>E:\viofs\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|         <PathAndCredentials wcm:action="add" wcm:keyValue="12"> | ||||
|           <Path>E:\Balloon\w10\amd64</Path> | ||||
|         </PathAndCredentials> | ||||
|       </DriverPaths> | ||||
|     </component> | ||||
|   </settings> | ||||
| 
 | ||||
|   <settings pass="oobeSystem"> | ||||
|     <component name="Microsoft-Windows-Shell-Setup" | ||||
|       processorArchitecture="amd64" | ||||
|       publicKeyToken="31bf3856ad364e35" | ||||
|       language="neutral" | ||||
|       versionScope="nonSxS" | ||||
|       xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" | ||||
|       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||
|       <OOBE> | ||||
|         <HideEULAPage>true</HideEULAPage> | ||||
|         <HideLocalAccountScreen>false</HideLocalAccountScreen> | ||||
|         <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> | ||||
|         <HideOnlineAccountScreens>false</HideOnlineAccountScreens> | ||||
|         <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> | ||||
|         <ProtectYourPC>3</ProtectYourPC> | ||||
|         <SkipUserOOBE>false</SkipUserOOBE> | ||||
|         <SkipMachineOOBE>false</SkipMachineOOBE> | ||||
|         <VMModeOptimizations> | ||||
|           <SkipWinREInitialization>true</SkipWinREInitialization> | ||||
|         </VMModeOptimizations> | ||||
|       </OOBE> | ||||
|       <FirstLogonCommands> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install Virtio Guest Agent</Description> | ||||
|           <Order>1</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install spice-webdavd file sharing agent</Description> | ||||
|           <Order>2</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install usbdk USB sharing agent</Description> | ||||
|           <Order>3</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine> | ||||
|           <Description>Install spice-vdagent SPICE agent</Description> | ||||
|           <Order>4</Order> | ||||
|         </SynchronousCommand> | ||||
|         <SynchronousCommand wcm:action="add"> | ||||
|           <CommandLine>Cmd /c POWERCFG -H OFF</CommandLine> | ||||
|           <Description>Disable Hibernation</Description> | ||||
|           <Order>5</Order> | ||||
|         </SynchronousCommand> | ||||
|       </FirstLogonCommands> | ||||
|     </component> | ||||
|   </settings> | ||||
| </unattend> | ||||
| EOF | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| function dbg_windows() { | ||||
|   local DEBUG=0 | ||||
|   if [ ${DEBUG} -eq 1 ]; then | ||||
|     echo "${1}" | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb | ||||
| function get_windows() { | ||||
|     local ARCH="x64" | ||||
|  | @ -1280,34 +1539,47 @@ function get_windows() { | |||
|     validate_release "releases_windows" | ||||
| 
 | ||||
|     # Ignore the most recent Windows 10 release for now. | ||||
|     if [ ${RELEASE} -eq 10 ]; then | ||||
|       INDEX=1 | ||||
|     if [ "${RELEASE}" -eq 10 ]; then | ||||
|       INDEX=0 | ||||
|     fi | ||||
| 
 | ||||
|     if [ "${RELEASE}" -eq 11 ]; then | ||||
|       INDEX=1 | ||||
|       INDEX=0 | ||||
|     fi | ||||
| 
 | ||||
|     echo "Getting Windows ${RELEASE} URL..." | ||||
|     WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))') | ||||
|     dbg_windows "${WINDOWS_VERSIONS}" | ||||
|     LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']') | ||||
|     dbg_windows "${LATEST_WINDOWS_VERSION}" | ||||
| 
 | ||||
|     WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name) | ||||
|     dbg_windows "${WINDOWS_NAME}" | ||||
|     VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id) | ||||
|     dbg_windows "${VERSION_ID}" | ||||
| 
 | ||||
|     case ${RELEASE} in | ||||
|         8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');; | ||||
|         10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '${RELEASE}'").edition_id');; | ||||
|     esac | ||||
|     dbg_windows "${EDITION_ID}" | ||||
| 
 | ||||
|     LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id') | ||||
|     dbg_windows "${LANGUAGE_ID}" | ||||
|     ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}") | ||||
|     dbg_windows "${ARCH_INFO}" | ||||
|     FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name') | ||||
|     dbg_windows "${FILE_NAME}" | ||||
|     ARCH_ID=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).arch_id') | ||||
|     dbg_windows "${ARCH_ID}" | ||||
|     DOWNLOAD_INFO=$(wget -q -O- "https://tb.rg-adguard.net/dl.php?fileName=${ARCH_ID}&lang=en") | ||||
|     dbg_windows "${DOWNLOAD_INFO}" | ||||
|     DOWNLOAD_SHA1=$(echo "${DOWNLOAD_INFO}" | sed -e 's/<[^>]*>//g' | grep -o -P '(?<=SHA1: ).*(?= expire)' | sed 's/Link//') | ||||
|     dbg_windows "${DOWNLOAD_SHA1}" | ||||
|     DOWNLOAD_ID=$(echo "${DOWNLOAD_INFO}" | grep -oP '(?<=https:\/\/tb\.rg-adguard\.net/dl\.php\?go=)[0-9a-z]+') | ||||
|     dbg_windows "${DOWNLOAD_ID}" | ||||
|     DOWNLOAD_URL="https://tb.rg-adguard.net/dl.php?go=${DOWNLOAD_ID}" | ||||
|     dbg_windows "${DOWNLOAD_URL}" | ||||
| 
 | ||||
|     echo "Downloading ${WINDOWS_NAME}..." | ||||
|     web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}" | ||||
|  | @ -1353,7 +1625,7 @@ if [ -n "${1}" ]; then | |||
|         list_json | ||||
|     elif [ "${OS}" == "--version" ] || [ "${OS}" == "-version" ] || [ "${OS}" == "version" ]; then | ||||
|       whereIam=$(dirname "${BASH_SOURCE[0]}") | ||||
|       quickemu_version=$( ${whereIam}/quickemu --version) | ||||
|       quickemu_version=$( "${whereIam}"/quickemu --version) | ||||
|       echo "Quickemu Version: ${quickemu_version}" | ||||
|       exit 0 | ||||
|     fi | ||||
|  | @ -1367,10 +1639,42 @@ if [ -n "${2}" ]; then | |||
|     RELEASE="${2,,}" | ||||
|     VM_PATH="${OS}-${RELEASE}" | ||||
| 
 | ||||
|     if [ "${OS}" == "android" ]; then | ||||
|     if [ "${OS}" == "alma" ]; then | ||||
|      if [ -n "${3}" ]; then | ||||
|             ISOTYPE="${3,,}" | ||||
|             ISOTYPES=(minimal dvd ) # boot) # a step too far | ||||
|             if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then | ||||
|                 echo "iso ${ISOTYPE} is not supported:" | ||||
|                 for ISOTYPE in "${ISOTYPES[@]}"; do | ||||
|                   echo "${ISOTYPE}" | ||||
|                 done | ||||
|                 exit 1 | ||||
|             fi | ||||
|         else | ||||
|             ISOTYPE="minimal" | ||||
|         fi | ||||
|         VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" | ||||
|         get_alma "${ISOTYPE}" | ||||
|     elif [ "${OS}" == "android" ]; then | ||||
|         get_android | ||||
|     elif [ "${OS}" == "archlinux" ]; then | ||||
|         get_archlinux | ||||
|     elif [ "${OS}" == "debian" ]; then | ||||
|      if [ -n "${3}" ]; then | ||||
|             FREEDOM="${3}" | ||||
|             FREEDOMS=(standard nonfree) | ||||
|             if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then | ||||
|                 echo "ERROR! ${FREEDOM} is not a supported freedom:" | ||||
|                 for DRIVER in "${FREEDOMS[@]}"; do | ||||
|                   echo "${FREEDOM}" | ||||
|                 done | ||||
|                 exit 1 | ||||
|             fi | ||||
|         else | ||||
|             FREEDOM="standard" | ||||
|         fi | ||||
|         VM_PATH="${OS}-${RELEASE}-${FREEDOM}" | ||||
|         get_debian  "${FREEDOM}" | ||||
|     elif [ "${OS}" == "elementary" ]; then | ||||
|         get_elementary | ||||
|     elif [ "${OS}" == "macos" ]; then | ||||
|  | @ -1395,6 +1699,8 @@ if [ -n "${2}" ]; then | |||
|         get_openbsd | ||||
|     elif [ "${OS}" == "opensuse" ]; then | ||||
|         get_opensuse | ||||
|     elif [ "${OS}" == "oraclelinux" ]; then | ||||
|         get_oraclelinux | ||||
|   elif [ "${OS}" == "popos" ]; then | ||||
|         if [ -n "${3}" ]; then | ||||
|             DRIVER="${3}" | ||||
|  | @ -1456,10 +1762,14 @@ if [ -n "${2}" ]; then | |||
|     fi | ||||
| else | ||||
|     echo -n "ERROR! You must specify a release: " | ||||
|     if [ "${OS}" == "android" ]; then | ||||
|     if [ "${OS}" == "alma" ]; then | ||||
|         releases_alma | ||||
|     elif [ "${OS}" == "android" ]; then | ||||
|         releases_android | ||||
|     elif [ "${OS}" == "archlinux" ]; then | ||||
|         releases_archlinux | ||||
|     elif [ "${OS}" == "debian" ]; then | ||||
|         releases_debian | ||||
|     elif [ "${OS}" == "elementary" ]; then | ||||
|         releases_elementary | ||||
|     elif [ "${OS}" == "freebsd" ]; then | ||||
|  | @ -1478,6 +1788,8 @@ else | |||
|         releases_nixos | ||||
|     elif [ "${OS}" == "opensuse" ]; then | ||||
|         releases_opensuse | ||||
|     elif [ "${OS}" == "oraclelinux" ]; then | ||||
|         releases_oraclelinux | ||||
|     elif [ "${OS}" == "openbsd" ]; then | ||||
|         releases_openbsd | ||||
|     elif [ "${OS}" == "macos" ]; then | ||||
|  | @ -1486,6 +1798,8 @@ else | |||
|         releases_popos | ||||
|     elif [ "${OS}" == "regolith" ]; then | ||||
|         releases_regolith | ||||
|     elif [ "${OS}" == "rockylinux" ]; then | ||||
|         releases_rockylinux | ||||
|     elif [ "${OS}" == "solus" ]; then | ||||
|         releases_solus | ||||
|     elif [[ "${OS}" == *"ubuntu"* ]]; then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue