fix: add not_supported_argument()
This commit is contained in:
parent
5026eaef06
commit
0da48d73b0
12
quickget
12
quickget
|
@ -146,7 +146,7 @@ function show_os_info() {
|
||||||
while getopts ":12345" opt; do
|
while getopts ":12345" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
1|2|3|4|5) os_info "${2}" | cut -d'|' -f${opt};;
|
1|2|3|4|5) os_info "${2}" | cut -d'|' -f${opt};;
|
||||||
*) echo "Wrong choice!" && exit 1;;
|
*) error_not_supported_argument;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -253,6 +253,13 @@ function error_not_supported_lang() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function error_not_supported_argument() {
|
||||||
|
echo "ERROR! Not supported argument"
|
||||||
|
echo "To see all possible arguments, use:"
|
||||||
|
echo " quickget -h or quickget --help"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
function handle_missing() {
|
function handle_missing() {
|
||||||
# Handle odd missing Fedora combinations
|
# Handle odd missing Fedora combinations
|
||||||
case "${OS}" in
|
case "${OS}" in
|
||||||
|
@ -3431,6 +3438,9 @@ case "${1}" in
|
||||||
'--list'|'-l')
|
'--list'|'-l')
|
||||||
list_supported
|
list_supported
|
||||||
;;
|
;;
|
||||||
|
-*)
|
||||||
|
error_not_supported_argument
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -n "${1}" ]; then
|
if [ -n "${1}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue