Initial attempt at supporting Ubuntu Server
Pros: - Supports Ubuntu Server 20.04+ Cons: - Ugh, for some reason, keeps defaulting to the desktop/live branch - The configuration isn't created either.
This commit is contained in:
parent
7db5167cac
commit
52aaa9bd32
27
quickget
27
quickget
@ -62,6 +62,7 @@ function pretty_name() {
|
|||||||
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
||||||
ubuntukylin) PRETTY_NAME="Ubuntu Kylin";;
|
ubuntukylin) PRETTY_NAME="Ubuntu Kylin";;
|
||||||
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
|
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
|
||||||
|
ubuntu-server) PRETTY_NAME="Ubuntu Server";;
|
||||||
ubuntustudio) PRETTY_NAME="Ubuntu Studio";;
|
ubuntustudio) PRETTY_NAME="Ubuntu Studio";;
|
||||||
void) PRETTY_NAME="Void Linux";;
|
void) PRETTY_NAME="Void Linux";;
|
||||||
zorin) PRETTY_NAME="Zorin OS";;
|
zorin) PRETTY_NAME="Zorin OS";;
|
||||||
@ -77,6 +78,7 @@ function validate_release() {
|
|||||||
|
|
||||||
DISPLAY_NAME="$(pretty_name "${OS}")"
|
DISPLAY_NAME="$(pretty_name "${OS}")"
|
||||||
case ${OS} in
|
case ${OS} in
|
||||||
|
ubuntu-server) RELEASE_GENERATOR="releases_ubuntuserver";;
|
||||||
*ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
|
*ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
|
||||||
*) RELEASE_GENERATOR="${1}";;
|
*) RELEASE_GENERATOR="${1}";;
|
||||||
esac
|
esac
|
||||||
@ -205,6 +207,7 @@ function os_support() {
|
|||||||
ubuntu-budgie \
|
ubuntu-budgie \
|
||||||
ubuntukylin \
|
ubuntukylin \
|
||||||
ubuntu-mate \
|
ubuntu-mate \
|
||||||
|
ubuntu-server \
|
||||||
ubuntustudio \
|
ubuntustudio \
|
||||||
void \
|
void \
|
||||||
windows \
|
windows \
|
||||||
@ -470,6 +473,10 @@ function releases_tails() {
|
|||||||
echo stable
|
echo stable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function releases_ubuntuserver() {
|
||||||
|
echo live-server-20.04 live-server-22.04
|
||||||
|
}
|
||||||
|
|
||||||
function releases_ubuntu() {
|
function releases_ubuntu() {
|
||||||
local LTS_SUPPORT="14.04 16.04 18.04 20.04 22.04"
|
local LTS_SUPPORT="14.04 16.04 18.04 20.04 22.04"
|
||||||
case "${OS}" in
|
case "${OS}" in
|
||||||
@ -1434,6 +1441,16 @@ function get_ubuntu() {
|
|||||||
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
|
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${RELEASE}" == "ubuntu-server" ]; then
|
||||||
|
if wget -q --spider "${URL}/SHA256SUMS"; then
|
||||||
|
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'live-server\|install' | grep amd64 | grep iso | cut -d'*' -f2)
|
||||||
|
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'live-server\|install' | grep amd64 | grep iso |cut -d' ' -f1)
|
||||||
|
else
|
||||||
|
ISO=$(wget -q -O- "${URL}/MD5SUMS" | grep 'live-server\|install' | grep amd64 | grep iso | cut -d' ' -f3)
|
||||||
|
HASH=$(wget -q -O- "${URL}/MD5SUMS" | grep 'live-server|install' | grep amd64 | grep iso | cut -d' ' -f1)
|
||||||
|
fi
|
||||||
|
else
|
||||||
if wget -q --spider "${URL}/SHA256SUMS"; then
|
if wget -q --spider "${URL}/SHA256SUMS"; then
|
||||||
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d'*' -f2)
|
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d'*' -f2)
|
||||||
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso |cut -d' ' -f1)
|
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso |cut -d' ' -f1)
|
||||||
@ -1441,7 +1458,7 @@ function get_ubuntu() {
|
|||||||
ISO=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f3)
|
ISO=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f3)
|
||||||
HASH=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f1)
|
HASH=$(wget -q -O- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | cut -d' ' -f1)
|
||||||
fi
|
fi
|
||||||
#echo "${URL}/${ISO} ${HASH}"
|
fi
|
||||||
|
|
||||||
if [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
|
if [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
|
||||||
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
|
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
|
||||||
@ -1965,6 +1982,10 @@ if [ -n "${2}" ]; then
|
|||||||
# macOS doesn't use create_vm()
|
# macOS doesn't use create_vm()
|
||||||
validate_release releases_macos
|
validate_release releases_macos
|
||||||
get_macos
|
get_macos
|
||||||
|
elif [[ "${OS}" == "ubuntuserver" ]]; then
|
||||||
|
# Ubuntu doesn't use create_vm()
|
||||||
|
validate_release releases_ubuntuserver
|
||||||
|
get_ubuntu
|
||||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||||
# Ubuntu doesn't use create_vm()
|
# Ubuntu doesn't use create_vm()
|
||||||
validate_release releases_ubuntu
|
validate_release releases_ubuntu
|
||||||
@ -1995,6 +2016,10 @@ if [ -n "${2}" ]; then
|
|||||||
else
|
else
|
||||||
echo "ERROR! You must specify a release."
|
echo "ERROR! You must specify a release."
|
||||||
case ${OS} in
|
case ${OS} in
|
||||||
|
*ubuntu-server*)
|
||||||
|
echo -n " - Releases: "
|
||||||
|
releases_ubuntuserver | sed -Ee 's/eol-\S+//g' # hide eol releases
|
||||||
|
;;
|
||||||
*ubuntu*)
|
*ubuntu*)
|
||||||
echo -n " - Releases: "
|
echo -n " - Releases: "
|
||||||
releases_ubuntu | sed -Ee 's/eol-\S+//g' # hide eol releases
|
releases_ubuntu | sed -Ee 's/eol-\S+//g' # hide eol releases
|
||||||
|
Loading…
Reference in New Issue
Block a user