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() {
|
function list_url_all() {
|
||||||
local DIR="/dev/null"
|
|
||||||
local URL
|
local URL
|
||||||
local FUNC
|
|
||||||
local OPTION
|
local OPTION
|
||||||
local OS="${1}"
|
local OS="${1}"
|
||||||
if [[ "${OS}" == *ubuntu-server* ]]; then
|
local FUNC="${OS}"
|
||||||
FUNC="ubuntu-server"
|
if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then
|
||||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
|
||||||
FUNC="ubuntu"
|
FUNC="ubuntu"
|
||||||
else
|
|
||||||
FUNC="${OS}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
|
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
|
elif [[ "${OS}" == "macos" ]]; then
|
||||||
validate_release releases_"${OS}"
|
validate_release releases_"${OS}"
|
||||||
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
||||||
elif [[ "${OS}" == *ubuntu-server* ]]; then
|
elif [ "${OS}" == "ubuntu-server" ]; then
|
||||||
validate_release releases_ubuntu-server
|
validate_release releases_ubuntu-server
|
||||||
(get_ubuntu-server)
|
(get_ubuntu-server)
|
||||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||||
|
@ -440,15 +435,11 @@ function list_url_all() {
|
||||||
|
|
||||||
function list_check_all() {
|
function list_check_all() {
|
||||||
local URL
|
local URL
|
||||||
local FUNC
|
|
||||||
local OPTION
|
local OPTION
|
||||||
local OS="${1}"
|
local OS="${1}"
|
||||||
if [[ "${OS}" == *ubuntu-server* ]]; then
|
local FUNC="${OS}"
|
||||||
FUNC="ubuntu-server"
|
if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then
|
||||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
|
||||||
FUNC="ubuntu"
|
FUNC="ubuntu"
|
||||||
else
|
|
||||||
FUNC="${OS}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
|
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
|
elif [[ "${OS}" == "macos" ]]; then
|
||||||
validate_release releases_"${OS}"
|
validate_release releases_"${OS}"
|
||||||
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
echo -e "SKIP:\t${OS}\t${RELEASE}"
|
||||||
elif [[ "${OS}" == *ubuntu-server* ]]; then
|
elif [ "${OS}" == "ubuntu-server" ]; then
|
||||||
validate_release releases_ubuntu-server
|
validate_release releases_ubuntu-server
|
||||||
(get_ubuntu-server)
|
(get_ubuntu-server)
|
||||||
elif [[ "${OS}" == *ubuntu* ]]; then
|
elif [[ "${OS}" == *ubuntu* ]]; then
|
||||||
|
|
Loading…
Reference in New Issue