add function and clean up logic for array

This commit is contained in:
Dmitry Shibanov
2020-10-01 13:07:40 +03:00
parent 89bf727a19
commit d0f8592d88
2 changed files with 10 additions and 12 deletions

View File

@@ -42,4 +42,9 @@ download_with_retries() {
## fi
function IsPackageInstalled {
dpkg -S $1 &> /dev/null
}
verlte() {
sortedVersion=$(echo -e "$1\n$2" | sort -V | head -n1)
[ "$1" = "$sortedVersion" ]
}