Fix search path for pyrogenesis
authorVincent Cheng <vcheng@debian.org>
Tue, 7 Sep 2021 08:50:57 +0000 (09:50 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 7 Sep 2021 08:50:57 +0000 (09:50 +0100)
Forwarded: http://trac.wildfiregames.com/ticket/1424
Bug-Debian: https://bugs.debian.org/679033
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1380737
Last-Update: 2014-10-13

Modify launcher script to execute /usr/games/pyrogenesis if /usr/games is
not in the user's $PATH.

Gbp-Pq: Name fix-bindir.patch

build/resources/0ad.sh

index 944f8c364f12e167c0319e271ef0ee3cf29e52a3..594a12efbb25adea9526c7c036b263a1048f0364 100644 (file)
@@ -3,6 +3,9 @@
 pyrogenesis=$(which pyrogenesis 2> /dev/null)
 if [ -x "$pyrogenesis" ] ; then
   "$pyrogenesis" "$@"
+elif [ -x /usr/games/pyrogenesis ] ; then
+  # Fallback in case /usr/games is not in $PATH; see #679033 and LP: #1380737
+  /usr/games/pyrogenesis "$@"
 else
   echo "Error: pyrogenesis not found in ($PATH)"
   exit 1