mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-21 21:45:39 +00:00
Fix version change detection logic for cookers
This commit is contained in:
parent
26de86eed5
commit
fb4a1525c5
|
@ -171,5 +171,12 @@ elif [[ "$new_version_major_rev" -eq "$current_version_major_rev" ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Perform post_update commands for current version if it is a cooker
|
||||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build, always perform post_update commands for current version
|
||||
if [[ "$(echo $hard_version | cut -d'-' -f2)" == "$new_version" ]]; then
|
||||
is_newer_version="true"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$is_newer_version"
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ done
|
|||
log d "Update triggered"
|
||||
# if lockfile exists
|
||||
if [ -f "$lockfile" ]; then
|
||||
log d "Lockfile found but the version doesn't match with the config file"
|
||||
if [ "$hard_version" != "$version" ]; then
|
||||
log d "Lockfile found but the version doesn't match with the config file"
|
||||
log i "Config file's version is $version but the actual version is $hard_version"
|
||||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
||||
log d "Newly-installed version is a \"cooker\" build"
|
||||
|
@ -130,6 +130,7 @@ if [ -f "$lockfile" ]; then
|
|||
log w "Removing RetroDECK data and starting fresh"
|
||||
rm -rf /var
|
||||
rm -rf "$HOME/retrodeck"
|
||||
rm -rf "$rdhome"
|
||||
source /app/libexec/global.sh
|
||||
finit
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue