fix: update get_ubuntu-server() to support 14.04 and 16.04
This commit is contained in:
parent
a69a28ed4f
commit
4a422b9465
14
quickget
14
quickget
|
@ -2495,6 +2495,7 @@ function get_tuxedoos() {
|
||||||
function get_ubuntu-server() {
|
function get_ubuntu-server() {
|
||||||
local HASH=""
|
local HASH=""
|
||||||
local ISO=""
|
local ISO=""
|
||||||
|
local NAME="live-server"
|
||||||
local URL=""
|
local URL=""
|
||||||
[[ $RELEASE = daily ]] && RELEASE=daily-live
|
[[ $RELEASE = daily ]] && RELEASE=daily-live
|
||||||
if [[ "${RELEASE}" == "daily"* ]]; then
|
if [[ "${RELEASE}" == "daily"* ]]; then
|
||||||
|
@ -2502,19 +2503,20 @@ function get_ubuntu-server() {
|
||||||
else
|
else
|
||||||
URL="https://releases.ubuntu.com/${RELEASE}"
|
URL="https://releases.ubuntu.com/${RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case "${RELEASE}" in
|
||||||
|
14*|16*) NAME="server";;
|
||||||
|
esac
|
||||||
|
|
||||||
if web_check "${URL}/SHA256SUMS"; then
|
if web_check "${URL}/SHA256SUMS"; then
|
||||||
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
|
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
||||||
ISO=$(cut -d'*' -f2 <<<${DATA})
|
ISO=$(cut -d'*' -f2 <<<${DATA})
|
||||||
HASH=$(cut_1 <<<${DATA})
|
HASH=$(cut_1 <<<${DATA})
|
||||||
else
|
else
|
||||||
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
|
DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
||||||
ISO=$(cut -d' ' -f3 <<<${DATA})
|
ISO=$(cut -d' ' -f3 <<<${DATA})
|
||||||
HASH=$(cut_1 <<<${DATA})
|
HASH=$(cut_1 <<<${DATA})
|
||||||
fi
|
fi
|
||||||
if [ -z $ISO ] || [ -z $HASH ]; then
|
|
||||||
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
|
|
||||||
exit 1
|
|
||||||
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"
|
||||||
make_vm_config "${OS}-devel.iso"
|
make_vm_config "${OS}-devel.iso"
|
||||||
|
|
Loading…
Reference in New Issue