mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
More move function work
This commit is contained in:
parent
4e1b0154a2
commit
6e64317a57
|
@ -243,7 +243,7 @@ enable_file() {
|
||||||
mv $(realpath $1.disabled) $(realpath $(echo $1 | sed -e 's/\.disabled//'))
|
mv $(realpath $1.disabled) $(realpath $(echo $1 | sed -e 's/\.disabled//'))
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_patch () {
|
generate_patch() {
|
||||||
# generate_patch $original_file $modified_file $patch_file $system
|
# generate_patch $original_file $modified_file $patch_file $system
|
||||||
|
|
||||||
rm $3 # Remove old patch file (maybe change this to create a backup instead?)
|
rm $3 # Remove old patch file (maybe change this to create a backup instead?)
|
||||||
|
@ -343,7 +343,7 @@ generate_patch () {
|
||||||
done < $2
|
done < $2
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy_patch () {
|
deploy_patch() {
|
||||||
|
|
||||||
# This function will take an "original" file and a patch file and generate a ready to use modified file
|
# This function will take an "original" file and a patch file and generate a ready to use modified file
|
||||||
# USAGE: deploy_patch $original_file $patch_file $output_file
|
# USAGE: deploy_patch $original_file $patch_file $output_file
|
||||||
|
|
|
@ -379,7 +379,7 @@ configurator_move_dialog() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"SD Card" )
|
"SD Card" )
|
||||||
if [[ -L "$HOME/retrodeck" && -d $sdcard/retrodeck && "$rdhome" == "$sdcard/retrodeck" ]]; then
|
if [[ -L "$HOME/retrodeck" && -d "$sdcard/retrodeck" && "$rdhome" == "$sdcard/retrodeck" ]]; then
|
||||||
configurator_generic_dialog "The RetroDECK data folder is already configured to that location, please pick a new one."
|
configurator_generic_dialog "The RetroDECK data folder is already configured to that location, please pick a new one."
|
||||||
configurator_move_dialog
|
configurator_move_dialog
|
||||||
else
|
else
|
||||||
|
@ -401,6 +401,14 @@ configurator_move_dialog() {
|
||||||
--title "RetroDECK Configurator Utility - Move in Progress" \
|
--title "RetroDECK Configurator Utility - Move in Progress" \
|
||||||
--text="Moving directory $rdhome to new location of $sdcard/retrodeck, please wait."
|
--text="Moving directory $rdhome to new location of $sdcard/retrodeck, please wait."
|
||||||
|
|
||||||
|
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||||
|
unlink $rdhome
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -L "$HOME/retrodeck" ]]; then # Always link back to original directory
|
||||||
|
ln -svf "$sdcard/retrodeck" "$HOME/retrodeck"
|
||||||
|
fi
|
||||||
|
|
||||||
rdhome="$sdcard/retrodeck"
|
rdhome="$sdcard/retrodeck"
|
||||||
roms_folder="$rdhome/roms"
|
roms_folder="$rdhome/roms"
|
||||||
saves_folder="$rdhome/saves"
|
saves_folder="$rdhome/saves"
|
||||||
|
@ -442,6 +450,14 @@ configurator_move_dialog() {
|
||||||
--title "RetroDECK Configurator Utility - Move in Progress" \
|
--title "RetroDECK Configurator Utility - Move in Progress" \
|
||||||
--text="Moving directory $rdhome to new location of $custom_dest/retrodeck, please wait."
|
--text="Moving directory $rdhome to new location of $custom_dest/retrodeck, please wait."
|
||||||
|
|
||||||
|
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||||
|
unlink $rdhome
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -L "$HOME/retrodeck" ]]; then
|
||||||
|
ln -svf "$custom_dest/retrodeck" "$HOME/retrodeck"
|
||||||
|
fi
|
||||||
|
|
||||||
rdhome="$custom_dest/retrodeck"
|
rdhome="$custom_dest/retrodeck"
|
||||||
roms_folder="$rdhome/roms"
|
roms_folder="$rdhome/roms"
|
||||||
saves_folder="$rdhome/saves"
|
saves_folder="$rdhome/saves"
|
||||||
|
|
Loading…
Reference in a new issue