Fix app selection

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-03-22 16:41:39 +02:00
parent dbf19ee556
commit 6541ab8ab0

View File

@@ -130,7 +130,7 @@ echo -e "Loading apps... \n"
if [ $# -eq 0 ]; then
read -p "Enter the app numbers you want to download, leave blank for all (e.g. 1,3,5-7): " menuinput
if [[ -z $menuinput ]]; then
menuinput=$(seq 0 $((${#apps[@]} - 1)))
menuinput=0-$((${#apps[@]} - 1))
fi
# If the script was run with -a or --apps, use the second argument as the app numbers
elif [ $# -eq 2 ]; then
@@ -141,7 +141,7 @@ fi
# If the script was run with -A or --all, download all apps
if [ $# -eq 1 ]; then
if [ "$1" == "--all" ] || [ "$1" == "-A" ]; then
menuinput=$(seq 0 $((${#apps[@]} - 1)))
menuinput=0-$((${#apps[@]} - 1))
fi
fi