diff --git a/download_apkmirror.sh b/download_apkmirror.sh index 1f908d9..a01f3a6 100755 --- a/download_apkmirror.sh +++ b/download_apkmirror.sh @@ -91,7 +91,7 @@ for apk in "${!apks[@]}"; do version=0 for vers in $supported_vers; do if [ $vers != "null" ]; then - if [[ ${vers//[!0-9]/} -gt ${version//[!0-9]/} ]]; then + if [[ $vers==0 || ${vers//[!0-9]/} -lt ${version//[!0-9]/} ]]; then version=$vers fi fi