refactor(quickget): remove single use function error_not_supported_os()
This commit is contained in:
parent
46b981728d
commit
e1a46b9b5a
10
quickget
10
quickget
|
@ -148,7 +148,9 @@ function error_specify_os() {
|
||||||
|
|
||||||
function os_supported() {
|
function os_supported() {
|
||||||
if [[ ! "$(os_support)" =~ ${OS} ]]; then
|
if [[ ! "$(os_support)" =~ ${OS} ]]; then
|
||||||
error_not_supported_os
|
echo -e "ERROR! ${OS} is not a supported OS.\n"
|
||||||
|
os_support | fold -s -w "$(tput cols)"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,12 +197,6 @@ function error_specify_path() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function error_not_supported_os() {
|
|
||||||
echo -e "ERROR! ${OS} is not a supported OS.\n"
|
|
||||||
os_support | fold -s -w "$(tput cols)"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
function error_not_supported_release() {
|
function error_not_supported_release() {
|
||||||
if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then
|
if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then
|
||||||
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
|
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
|
||||||
|
|
Loading…
Reference in New Issue