Added remove no fav game

This commit is contained in:
Lx32 2024-09-24 22:33:20 +02:00
parent 821fda1c47
commit c948f88f19

View file

@ -6,6 +6,9 @@ add_to_steam() {
log "i" "Starting Steam Sync" log "i" "Starting Steam Sync"
steamsync_folder="$rdhome/.sync" steamsync_folder="$rdhome/.sync"
steamsync_folder_tmp="$rdhome/.sync-tmp"
create_dir $steamsync_folder
mv $steamsync_folder $steamsync_folder_tmp
create_dir $steamsync_folder create_dir $steamsync_folder
local srm_path="/var/config/steam-rom-manager/userData/userConfigurations.json" local srm_path="/var/config/steam-rom-manager/userData/userConfigurations.json"
@ -76,8 +79,9 @@ add_to_steam() {
log d "Sanitized Name: $sanitized_name" log d "Sanitized Name: $sanitized_name"
local launcher="$steamsync_folder/${sanitized_name}.sh" local launcher="$steamsync_folder/${sanitized_name}.sh"
local launcher_tmp="$steamsync_folder_tmp/${sanitized_name}.sh"
if [ ! -e "$launcher" ]; then if [ ! -e "$launcher_tmp" ]; then
log d "Creating desktop file: $launcher" log d "Creating desktop file: $launcher"
@ -114,11 +118,14 @@ fi
EOF EOF
else else
log d "$launcher desktop file already exists" log d "$launcher desktop file already exists"
mv "$launcher_tmp" "$launcher"
fi fi
done done
fi fi
done done
rm -r $steamsync_folder_tmp
if [ -z "$( ls -A $steamsync_folder )" ]; then if [ -z "$( ls -A $steamsync_folder )" ]; then
log d "No games found, cleaning shortcut" log d "No games found, cleaning shortcut"
remove_from_steam remove_from_steam