mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-06-03 05:25:32 +02:00
refactor: simplify list_check_all() and list_url_all() initialisation
This commit is contained in:
parent
752afa56f4
commit
4be78cffb5
21
quickget
21
quickget
|
@ -394,17 +394,12 @@ function list_supported() {
|
|||
}
|
||||
|
||||
function list_url_all() {
|
||||
local DIR="/dev/null"
|
||||
local URL
|
||||
local FUNC
|
||||
local OPTION
|
||||
local OS="${1}"
|
||||
if [[ "${OS}" == *ubuntu-server* ]]; then
|
||||
FUNC="ubuntu-server"
|
||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||
local FUNC="${OS}"
|
||||
if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then
|
||||
FUNC="ubuntu"
|
||||
else
|
||||
FUNC="${OS}"
|
||||
fi
|
||||
|
||||
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
|
||||
|
@ -423,7 +418,7 @@ function list_url_all() {
|
|||
elif [[ "${OS}" == "macos" ]]; then
|
||||
validate_release releases_"${OS}"
|
||||
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
||||
elif [[ "${OS}" == *ubuntu-server* ]]; then
|
||||
elif [ "${OS}" == "ubuntu-server" ]; then
|
||||
validate_release releases_ubuntu-server
|
||||
(get_ubuntu-server)
|
||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||
|
@ -440,15 +435,11 @@ function list_url_all() {
|
|||
|
||||
function list_check_all() {
|
||||
local URL
|
||||
local FUNC
|
||||
local OPTION
|
||||
local OS="${1}"
|
||||
if [[ "${OS}" == *ubuntu-server* ]]; then
|
||||
FUNC="ubuntu-server"
|
||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||
local FUNC="${OS}"
|
||||
if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then
|
||||
FUNC="ubuntu"
|
||||
else
|
||||
FUNC="${OS}"
|
||||
fi
|
||||
|
||||
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
|
||||
|
@ -469,7 +460,7 @@ function list_check_all() {
|
|||
elif [[ "${OS}" == "macos" ]]; then
|
||||
validate_release releases_"${OS}"
|
||||
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
||||
elif [[ "${OS}" == *ubuntu-server* ]]; then
|
||||
elif [ "${OS}" == "ubuntu-server" ]; then
|
||||
validate_release releases_ubuntu-server
|
||||
(get_ubuntu-server)
|
||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user