mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-03-06 14:27:48 +00:00
Remove debugs, expand FINIT
This commit is contained in:
parent
6f93d55f7e
commit
ba553982da
19
functions.sh
19
functions.sh
|
@ -61,9 +61,9 @@ move() {
|
|||
if [[ $(verify_space $1 $2) ]]; then
|
||||
(
|
||||
if [[ ! -d $2 ]]; then # Create destination directory if it doesn't already exist
|
||||
debug_dialog "mkdir -pv $2"
|
||||
mkdir -pv $2
|
||||
fi
|
||||
debug_dialog "mv -v -t $2 $1"
|
||||
mv -v -t $2 $1
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
|
@ -759,11 +759,11 @@ old_browse(){
|
|||
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \
|
||||
--cancel-label="No" \
|
||||
--ok-label "Yes" \
|
||||
--text="Your rom folder will be:\n\n$sdcard/retrodeck/roms\n\nis that ok?"
|
||||
--text="Your RetroDECK data folder will be:\n\n$sdcard/retrodeck\n\nis that ok?"
|
||||
if [ $? == 0 ] #yes
|
||||
then
|
||||
path_selected == true
|
||||
roms_folder="$sdcard/retrodeck/roms"
|
||||
rdhome="$sdcard/retrodeck"
|
||||
break
|
||||
else
|
||||
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" --text="Do you want to quit?"
|
||||
|
@ -781,7 +781,7 @@ finit() {
|
|||
echo "Executing finit"
|
||||
|
||||
# Internal or SD Card?
|
||||
choice=$(configurator_destination_choice_dialog "ROMs" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your roms folder to be located?" )
|
||||
choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." )
|
||||
echo "Choice is $choice"
|
||||
|
||||
case $choice in
|
||||
|
@ -793,7 +793,7 @@ finit() {
|
|||
|
||||
"Internal Storage" ) # Internal
|
||||
echo "Internal selected"
|
||||
roms_folder="$rdhome/roms"
|
||||
rdhome="$HOME/retrodeck"
|
||||
;;
|
||||
|
||||
"SD Card" )
|
||||
|
@ -818,13 +818,16 @@ finit() {
|
|||
echo "Now quitting"
|
||||
exit 0
|
||||
else
|
||||
roms_folder="$sdcard/retrodeck/roms" # sdcard variable is correct as its given by browse function
|
||||
echo "ROMs folder = $roms_folder"
|
||||
rdhome="$sdcard/retrodeck"
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
if [[ ! -d /home/deck/retrodeck && ! -L /home/deck/retrodeck ]]; then # If data stored on SD card, create /home/deck/retrodeck symlink to keep things working until configs can get modified
|
||||
dir_prep "$rdhome" "/home/deck/retrodeck"
|
||||
fi
|
||||
|
||||
mkdir -pv $roms_folder
|
||||
|
||||
# TODO: after the next update of ES-DE this will not be needed
|
||||
|
|
|
@ -54,7 +54,6 @@ fi
|
|||
# If there is no config file I initalize the file with the the default values
|
||||
if [ ! -f "$rd_conf" ]
|
||||
then
|
||||
|
||||
mkdir -p /var/config/retrodeck
|
||||
echo "RetroDECK config file not found in $rd_conf"
|
||||
echo "Initializing"
|
||||
|
|
|
@ -5,9 +5,9 @@ post_update() {
|
|||
# post update script
|
||||
echo "Executing post-update script"
|
||||
|
||||
case $version in # Only run updates as needed
|
||||
local prev_version=$(sed -e 's/[\.a-z]//g' <<< $version)
|
||||
|
||||
"0.5.4b" )
|
||||
if [[ $prev_version -le "054" ]]; then
|
||||
|
||||
# Finding existing ROMs folder
|
||||
if [ -d "$default_sd/retrodeck" ]
|
||||
|
@ -177,9 +177,7 @@ post_update() {
|
|||
else
|
||||
echo "Version" $version "is after the save and state organization was changed, no need to sort again"
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
fi
|
||||
|
||||
# These commands are run every time, for now
|
||||
|
||||
|
|
|
@ -75,15 +75,12 @@ then
|
|||
then
|
||||
echo "Config file's version is $version but the actual version is $hard_version"
|
||||
post_update # Executing post update script
|
||||
start_retrodeck
|
||||
exit 0
|
||||
fi
|
||||
# Else, LOCKFILE IS NOT EXISTING (WAS REMOVED)
|
||||
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
||||
else
|
||||
echo "Lockfile not found"
|
||||
finit # Executing First/Force init
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Normal Startup
|
||||
|
|
Loading…
Reference in a new issue