fix: arithmetic expression caused issues

* replace it with string conditional

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-27 12:10:38 +02:00
parent 00b140531b
commit c76d7402d3

View File

@@ -87,7 +87,7 @@ function upload_selection(){
back_footer
while true; do
read -p "${cyan}###### Please select:${white} " option
if [ -n "${option}" ] && ((option < ${#logfiles[@]})); then
if [[ -n "${option}" && "${option}" -ge 0 && "${option}" -lt "${#logfiles[@]}" ]]; then
upload_log "${logfiles[${option}]}"
upload_selection
elif [[ "${option}" == "B" || "${option}" == "b" ]]; then