summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-01-06 14:58:44 -0500
committerLouie S <louie@example.com>2024-01-06 14:58:44 -0500
commit10e80054bdbc9edf930cbc5c1f1285a20fe160ed (patch)
tree2b45c676833d18ff91abb0e004da6c0b29208d12
parent7b800e0293e0762db87f4f6f6377038c6540718b (diff)
Fix method for checking and writing ROMPATH to desktop file
-rw-r--r--.gitignore8
-rwxr-xr-xrom-desktop-entry-generator.sh7
2 files changed, 7 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 14043a8..86a2245 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-output
-output/*
-icon
-icon/*
+*
+!.gitignore
+!rom-desktop-entry-generator.sh
+!config
diff --git a/rom-desktop-entry-generator.sh b/rom-desktop-entry-generator.sh
index 01663b4..e53976e 100755
--- a/rom-desktop-entry-generator.sh
+++ b/rom-desktop-entry-generator.sh
@@ -39,9 +39,8 @@ build_desktop_file() {
echo "Skipping: No configuration exists for SYSTEM" >> "$STDOUT_LOG"
return
fi
- # FIXME this warning can have false positives
- if [ ! -e "$ROMPATH" ]; then
- echo "Warning: PATH does not exist" >> "$STDOUT_LOG"
+ if ! eval test -e "\"$ROMPATH\""; then
+ echo "Warning: PATH $ROMPATH does not exist" >> "$STDOUT_LOG"
fi
unset launcher
@@ -54,7 +53,7 @@ build_desktop_file() {
echo "Type=Application" >> "$OUTPUT"
echo "Name=$NAME" >> "$OUTPUT"
echo "Icon=${SCRIPTNAME}_${SYSTEM}_${NAME}" >> "$OUTPUT"
- echo "Exec=$launcher $flags $ROMPATH" >> "$OUTPUT"
+ echo "Exec=$launcher $flags \"$ROMPATH\"" >> "$OUTPUT"
echo "Categories=Game" >> "$OUTPUT"
}