adjust version to be non-static

This commit is contained in:
Mario Voigt 2025-03-18 23:48:33 +01:00
parent e13432e8c1
commit 90ef10c90f

View File

@ -7,8 +7,6 @@
# - Fedora 41 @ 14.03.2025 (vmario891) # - Fedora 41 @ 14.03.2025 (vmario891)
# - TuxedoOS 24.04 LTS (Debian based)/noble @ 14.03.2025 (vmario891) # - TuxedoOS 24.04 LTS (Debian based)/noble @ 14.03.2025 (vmario891)
VERSION="0.3.11"
if [ "$EUID" -eq 0 ] if [ "$EUID" -eq 0 ]
then echo "Please do not run as root" then echo "Please do not run as root"
exit 1 exit 1
@ -17,6 +15,15 @@ fi
echo -e "Elevating script for sudo permissions (please enter password, if asked) ..." echo -e "Elevating script for sudo permissions (please enter password, if asked) ..."
sudo echo sudo echo
BOREPIN_RELEASES="https://gitlab.com/api/v4/projects/20862588/releases/"
echo -e "Getting releases ..."
curl --silent ${BOREPIN_RELEASES} | jq -r '.[]|.tag_name' | sed -e 's/v//'
LATEST_RELEASE=$(curl --silent ${BOREPIN_RELEASES} | jq -r '.[0]|.tag_name' | sed -e 's/release\/v//')
echo -e "\nLatest release: ${LATEST_RELEASE}"
if [ "$(grep -Ei 'debian|buntu|mint' /etc/*release)" ]; then if [ "$(grep -Ei 'debian|buntu|mint' /etc/*release)" ]; then
PACKMAN="apt-get" PACKMAN="apt-get"
PVENV="python3-venv" PVENV="python3-venv"
@ -44,7 +51,7 @@ fi
echo -e "Downloading Borepin APK ..." echo -e "Downloading Borepin APK ..."
BOREPIN_APK="org.fab_infra.fabaccess-Signed.apk" BOREPIN_APK="org.fab_infra.fabaccess-Signed.apk"
wget --quiet https://gitlab.com/api/v4/projects/20862588/packages/generic/borepin/v$VERSION/$BOREPIN_APK wget --quiet https://gitlab.com/api/v4/projects/20862588/packages/generic/borepin/v$LATEST_RELEASE/$BOREPIN_APK
if [ ! -f $BOREPIN_APK ]; then if [ ! -f $BOREPIN_APK ]; then
echo -e "Error downloading ..." echo -e "Error downloading ..."
exit 1 exit 1