Skip to content

Commit

Permalink
fix version2
Browse files Browse the repository at this point in the history
check
  • Loading branch information
3nids committed Jul 22, 2024
1 parent e77f0d9 commit c95b6ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/check_version.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env bash

VERSION_CHECK=$1
VERSION_INSTALLED=$(apt-cache show qgis | grep Version | cut -d' ' -f2 | cut -d. -f1,2 )
VERSION_INSTALLED=$(apt list --installed qgis | grep installed | cut -d: -f2 | cut -d\+ -f1)

if [[ ${VERSION_CHECK} == 'master' ]]; then
echo "installed: ${VERSION_INSTALLED}"
exit 0
fi

if [[ ${VERSION_CHECK} == ${VERSION_INSTALLED} ]]; then
if [[ ${VERSION_INSTALLED} =~ ^${VERSION_CHECK}\.[0-9]+ ]]; then
echo "version check ok: ${VERSION_INSTALLED}"
exit 0
fi
Expand Down

0 comments on commit c95b6ec

Please sign in to comment.