diff --git a/quickget b/quickget
index e13035f..876456a 100755
--- a/quickget
+++ b/quickget
@@ -408,332 +408,62 @@ function releases_zorin() {
15edulite32
}
-function unattended_windows() {
- cat << 'EOF' > "${1}"
-
-
-
-
+function check_hash() {
+ local iso=""
+ local hash=""
+ local hash_algo=""
+ iso="${VM_PATH}/${1}"
+ hash="${2}"
-
-
-
- true
-
-
+ # Guess the hash algorithm by the hash length
+ case ${#hash} in
+ 32) hash_algo=md5sum;;
+ 40) hash_algo=sha1sum;;
+ 64) hash_algo=sha256sum;;
+ 128) hash_algo=sha512sum;;
+ *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
+ return;;
+ esac
-
-
- false
-
+ echo -n "Checking ${iso} with ${hash_algo}... "
+ if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
+ echo "ERROR!"
+ echo "${iso} doesn't match ${hash}. Try running 'quickget' again."
+ exit 1
+ else
+ echo "Good!"
+ fi
+}
-
- 0
-
-
+function web_get() {
+ local DIR="${2}"
+ local FILE=""
+ local URL="${1}"
-
-
-
-
- 0
- true
-
-
-
- 1
- Primary
- 256
-
-
-
- 2
- EFI
- 128
-
-
-
- 3
- MSR
- 128
-
-
-
- 4
- Primary
- true
-
-
-
-
-
- 1
- 1
-
- NTFS
- DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
-
-
-
- 2
- 2
-
- FAT32
-
-
-
- 3
- 3
-
-
-
- 4
- 4
-
- C
- NTFS
-
-
-
-
-
-
-
- 0
- 4
-
- false
-
-
-
- true
-
- VK7JG-NPHTM-C97JM-9MPGT-3V66T
- Never
-
-
-
- true
- Never
-
-
+ if [ -n "${3}" ]; then
+ FILE="${3}"
+ else
+ FILE="${URL##*/}"
+ fi
-
+ if ! mkdir -p "${DIR}" 2>/dev/null; then
+ echo "ERROR! Unable to create directory ${DIR}"
+ exit 1
+ fi
-
-
-
- E:\qemufwcfg\w10\amd64
-
-
- E:\vioinput\w10\amd64
-
-
- E:\vioscsi\w10\amd64
-
-
- E:\viostor\w10\amd64
-
-
- E:\vioserial\w10\amd64
-
-
- E:\qxldod\w10\amd64
-
-
- E:\amd64\w10
-
-
- E:\viogpudo\w10\amd64
-
-
- E:\viorng\w10\amd64
-
-
- E:\NetKVM\w10\amd64
-
-
- E:\viofs\w10\amd64
-
-
- E:\Balloon\w10\amd64
-
-
-
-
+ if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
+ echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
+ exit 1
+ fi
+}
-
-
- *
-
- Wimpys World
- Quickemu
- 24/7
-
- Wimpys World
- https://github.com/wimpysworld/quickemu/issues
-
- Wimpys World
-
-
-
-
-
-
- true
- false
- true
- false
- true
- Home
- 3
- false
- false
-
- true
-
-
-
-
- msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn
- Install Virtio Guest Agent
- 1
-
-
- msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn
- Install spice-webdavd file sharing agent
- 2
-
-
- msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn
- Install usbdk USB sharing agent
- 3
-
-
- msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn
- Install spice-vdagent SPICE agent
- 4
-
-
- Cmd /c POWERCFG -H OFF
- Disable Hibernation
- 5
-
-
-
-
-
-EOF
-}
-
-function check_hash() {
- local iso=""
- local hash=""
- local hash_algo=""
- iso="${VM_PATH}/${1}"
- hash="${2}"
-
- # Guess the hash algorithm by the hash length
- case ${#hash} in
- 32) hash_algo=md5sum;;
- 40) hash_algo=sha1sum;;
- 64) hash_algo=sha256sum;;
- 128) hash_algo=sha512sum;;
- *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
- return;;
- esac
-
- echo -n "Checking ${iso} with ${hash_algo}... "
- if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
- echo "ERROR!"
- echo "${iso} doesn't match ${hash}. Try running 'quickget' again."
- exit 1
- else
- echo "Good!"
- fi
-}
-
-function web_get() {
- local DIR="${2}"
- local FILE=""
- local URL="${1}"
-
- if [ -n "${3}" ]; then
- FILE="${3}"
- else
- FILE="${URL##*/}"
- fi
-
- if ! mkdir -p "${DIR}" 2>/dev/null; then
- echo "ERROR! Unable to create directory ${DIR}"
- exit 1
- fi
-
- if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
- echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
- exit 1
- fi
-}
-
-function zsync_get() {
- local DIR="${2}"
- local FILE=""
- local OUT=""
- local URL="${1}"
- FILE="${URL##*/}"
- local ZS=""
+function zsync_get() {
+ local DIR="${2}"
+ local FILE=""
+ local OUT=""
+ local URL="${1}"
+ FILE="${URL##*/}"
+ local ZS=""
# check if we have a zsync installed somewhere
ZS="$(which zsync)"
@@ -1454,6 +1184,277 @@ function get_garuda() {
make_vm_config "${OS}-${RELEASE}.iso"
}
+function unattended_windows() {
+ cat << 'EOF' > "${1}"
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ false
+
+
+
+ 0
+
+
+
+
+
+
+
+ 0
+ true
+
+
+
+ 1
+ Primary
+ 256
+
+
+
+ 2
+ EFI
+ 128
+
+
+
+ 3
+ MSR
+ 128
+
+
+
+ 4
+ Primary
+ true
+
+
+
+
+
+ 1
+ 1
+
+ NTFS
+ DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
+
+
+
+ 2
+ 2
+
+ FAT32
+
+
+
+ 3
+ 3
+
+
+
+ 4
+ 4
+
+ C
+ NTFS
+
+
+
+
+
+
+
+ 0
+ 4
+
+ false
+
+
+
+ true
+
+ VK7JG-NPHTM-C97JM-9MPGT-3V66T
+ Never
+
+
+
+ true
+ Never
+
+
+
+
+
+
+
+
+ E:\qemufwcfg\w10\amd64
+
+
+ E:\vioinput\w10\amd64
+
+
+ E:\vioscsi\w10\amd64
+
+
+ E:\viostor\w10\amd64
+
+
+ E:\vioserial\w10\amd64
+
+
+ E:\qxldod\w10\amd64
+
+
+ E:\amd64\w10
+
+
+ E:\viogpudo\w10\amd64
+
+
+ E:\viorng\w10\amd64
+
+
+ E:\NetKVM\w10\amd64
+
+
+ E:\viofs\w10\amd64
+
+
+ E:\Balloon\w10\amd64
+
+
+
+
+
+
+
+ *
+
+ Wimpys World
+ Quickemu
+ 24/7
+
+ Wimpys World
+ https://github.com/wimpysworld/quickemu/issues
+
+ Wimpys World
+
+
+
+
+
+
+ true
+ false
+ true
+ false
+ true
+ Home
+ 3
+ false
+ false
+
+ true
+
+
+
+
+ msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn
+ Install Virtio Guest Agent
+ 1
+
+
+ msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn
+ Install spice-webdavd file sharing agent
+ 2
+
+
+ msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn
+ Install usbdk USB sharing agent
+ 3
+
+
+ msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn
+ Install spice-vdagent SPICE agent
+ 4
+
+
+ Cmd /c POWERCFG -H OFF
+ Disable Hibernation
+ 5
+
+
+
+
+
+EOF
+}
+
+
function dbg_windows() {
local DEBUG=0
if [ ${DEBUG} -eq 1 ]; then