mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Add validate_release() function
This commit is contained in:
parent
7d003eda88
commit
1b9eb20ba6
1 changed files with 15 additions and 0 deletions
15
quickget
15
quickget
|
@ -20,6 +20,21 @@ function pretty_name() {
|
||||||
esac
|
esac
|
||||||
echo "${PRETTY_NAME}"
|
echo "${PRETTY_NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function validate_release() {
|
||||||
|
local DISPLAY_NAME=""
|
||||||
|
local RELEASE_GENERATOR="${1}"
|
||||||
|
local RELEASES=""
|
||||||
|
|
||||||
|
DISPLAY_NAME="$(pretty_name "${OS}")"
|
||||||
|
RELEASES=$(${RELEASE_GENERATOR})
|
||||||
|
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
|
||||||
|
echo "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
|
||||||
|
echo "${RELEASES}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function list_all() {
|
function list_all() {
|
||||||
local DISPLAY_NAME
|
local DISPLAY_NAME
|
||||||
local FUNC
|
local FUNC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue