Fixed version recognition

This commit is contained in:
XargonWan 2022-10-06 23:47:09 +02:00 committed by GitHub
parent a4b9dc1288
commit 3ed4dee61e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -70,10 +70,11 @@ then
echo "RetroDECK config file not found in $rd_conf"
echo "Initializing"
touch $rd_conf
# Initializing the variables
version="$hard_version" # if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one
if [ -z $version]; then
version="$hard_version" # if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one
fi
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodeck
roms_folder="$rdhome/roms" # the default roms folder path
saves_folder="$rdhome/saves" # the default saves folder path

View file

@ -1,5 +1,15 @@
#!/bin/bash
# workaround to fix a bug when updating to 0.5.0b where the post update is not triggered
# basically from 0.5 it's not reading the version from the lockfile so it doesn't know from which version it came from and the new rule of global.sh is that if version is unknown it's like a first boot
# remove it in the future
lockfile="/var/config/retrodeck/.lock"
if [[ $(cat $lockfile) == *"0.4."* ]] || [[ $(cat $lockfile) == *"0.3."* ]] || [[ $(cat $lockfile) == *"0.2."* ]] || [[ $(cat $lockfile) == *"0.1."* ]]
then
echo "Running version workaround"
version=$(cat $lockfile)
fi
source /app/bin/global.sh
# We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions