mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Fix post-update ver check and add more move safety
This commit is contained in:
parent
d38b4c3d62
commit
ebb25d06d2
|
@ -7,7 +7,7 @@ post_update() {
|
|||
|
||||
local prev_version=$(sed -e 's/[\.a-z]//g' <<< $version)
|
||||
|
||||
if [[ $prev_version -le "054" ]]; then # If updating from prior to save sorting change
|
||||
if [[ $prev_version -le "050" ]]; then # If updating from prior to save sorting change at 0.5.0b
|
||||
|
||||
# Finding existing ROMs folder
|
||||
if [ -d "$default_sd/retrodeck" ]
|
||||
|
|
|
@ -465,9 +465,7 @@ configurator_move_dialog() {
|
|||
if [[ -L $rdhome/roms ]]; then # Check for ROMs symlink user may have created
|
||||
unlink $rdhome/roms
|
||||
fi
|
||||
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||
unlink $rdhome
|
||||
fi
|
||||
|
||||
unlink $HOME/retrodeck # Remove symlink for $rdhome if the previous location was not internal
|
||||
|
||||
(
|
||||
|
@ -482,6 +480,10 @@ configurator_move_dialog() {
|
|||
ln -svf "$custom_dest/retrodeck" "$HOME"
|
||||
fi
|
||||
|
||||
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||
unlink $rdhome
|
||||
fi
|
||||
|
||||
rdhome="$custom_dest/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
|
|
Loading…
Reference in a new issue