mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
Create file only if does not exists + fixed syntax
This commit is contained in:
parent
ec1f9a0305
commit
4c2e555812
|
@ -907,4 +907,4 @@ start_retrodeck() {
|
||||||
ponzu
|
ponzu
|
||||||
log i "Starting RetroDECK v$version"
|
log i "Starting RetroDECK v$version"
|
||||||
es-de
|
es-de
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,10 @@ 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"
|
||||||
log d "Creating desktop file: $launcher"
|
|
||||||
|
if [ ! -e $launcher ]; then
|
||||||
|
|
||||||
|
log d "Creating desktop file: $launcher"
|
||||||
|
|
||||||
# if [[ -v command_list_default[$system] ]]; then
|
# if [[ -v command_list_default[$system] ]]; then
|
||||||
# command="${command_list_default[$system]}"
|
# command="${command_list_default[$system]}"
|
||||||
|
@ -88,7 +91,7 @@ add_to_steam() {
|
||||||
# Populate the .sync script with the correct command
|
# Populate the .sync script with the correct command
|
||||||
# TODO: if there is any emulator defined in the xml we use that, else... how we can know which is the default one?
|
# TODO: if there is any emulator defined in the xml we use that, else... how we can know which is the default one?
|
||||||
# TODO: if steam is flatpak the command wrapping will change in .desktop
|
# TODO: if steam is flatpak the command wrapping will change in .desktop
|
||||||
local command="flatpak run net.retrodeck.retrodeck start '$roms_folder/$system/$path'"
|
local command="flatpak run net.retrodeck.retrodeck start '$roms_folder/$system/$path'"
|
||||||
# Create the launcher file using a heredoc - if you enable .desktp this remember to edit .desktop in SRM userConfigurations.json and the above launcher variable (and vice versa)
|
# Create the launcher file using a heredoc - if you enable .desktp this remember to edit .desktop in SRM userConfigurations.json and the above launcher variable (and vice versa)
|
||||||
# cat <<EOF > "$launcher"
|
# cat <<EOF > "$launcher"
|
||||||
# [Desktop Entry]
|
# [Desktop Entry]
|
||||||
|
@ -101,21 +104,24 @@ add_to_steam() {
|
||||||
# Type=Application
|
# Type=Application
|
||||||
# Categories=Game;Emulator;
|
# Categories=Game;Emulator;
|
||||||
# EOF
|
# EOF
|
||||||
cat <<EOF > "$launcher"
|
cat <<EOF > "$launcher"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ test "$(whereis flatpak)" = "flatpak:" ]; then
|
if [ test "\$(whereis flatpak)" = "flatpak:" ]; then
|
||||||
flatpak-spawn --host $command
|
flatpak-spawn --host $command
|
||||||
else
|
else
|
||||||
$command
|
$command
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
log d "$launcher desktop file already exists"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
steam-rom-manager add
|
#steam-rom-manager add
|
||||||
log i "Steam Sync: completed"
|
log i "Steam Sync: completed"
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_from_steam() {
|
remove_from_steam() {
|
||||||
echo "TBD"
|
echo "TBD"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue