summaryrefslogtreecommitdiff
path: root/spacecadetpinball/debian/SpaceCadetPinball
diff options
context:
space:
mode:
Diffstat (limited to 'spacecadetpinball/debian/SpaceCadetPinball')
-rwxr-xr-xspacecadetpinball/debian/SpaceCadetPinball17
1 files changed, 17 insertions, 0 deletions
diff --git a/spacecadetpinball/debian/SpaceCadetPinball b/spacecadetpinball/debian/SpaceCadetPinball
new file mode 100755
index 0000000..033de43
--- /dev/null
+++ b/spacecadetpinball/debian/SpaceCadetPinball
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Configure soundfonts if not already configured
+if [ -z "$SDL_SOUNDFONTS" ]; then
+ DEFAULT_SOUNDFONT="/usr/share/soundfonts/default.sf2"
+ if [ -f "$DEFAULT_SOUNDFONT" ]; then
+ # Use default soundfont since it exists
+ export SDL_SOUNDFONTS="$DEFAULT_SOUNDFONT"
+ else
+ # Use first available soundfont
+ export SDL_SOUNDFONTS="$(find /usr/share/soundfonts -type f,l -print -quit 2> /dev/null)"
+ fi
+fi
+
+# Run program in correct directory so it can find it's resources
+cd /usr/lib/spacecadetpinball
+exec ./SpaceCadetPinball "$@"
bgstack15