diff -p -up codeina-0.10.2/bin/codeina.improvegeckodetection codeina-0.10.2/bin/codeina --- codeina-0.10.2/bin/codeina.improvegeckodetection 2008-03-20 14:08:30.000000000 +0100 +++ codeina-0.10.2/bin/codeina 2008-08-07 16:36:49.000000000 +0200 @@ -3,19 +3,14 @@ # this script sets MOZILLA_FIVE_HOME and LD_LIBRARY_PATH as needed # by the gtkmozembed python module. -latest_firefox=`ls -1rdt /usr/lib{64,}/firefox* 2> /dev/null | tail -n 1` - -if [ -n "$latest_firefox" ] -then - # we found a /usr/lib/firefox* directory - if [ -f "$latest_firefox/libgtkembedmoz.so" ] - then - # and it contains a libgtkembedmoz.so file - export LD_LIBRARY_PATH=$latest_firefox:$LD_LIBRARY_PATH - # only set MOZILLA_FIVE_HOME if not set already - [ -n "$MOZILLA_FIVE_HOME" ] || \ - export MOZILLA_FIVE_HOME=$latest_firefox - fi -fi +for p in /usr/lib{64,}/xulrunner*/libxul.so; do + [ -f "$p" ] || continue + latest_xulrunner="$(dirname "$p")"/ + export LD_LIBRARY_PATH="$latest_xulrunner":$LD_LIBRARY_PATH + # only set MOZILLA_FIVE_HOME if not set already + [ -n "$MOZILLA_FIVE_HOME" ] || export MOZILLA_FIVE_HOME="$latest_xulrunner" + # We need only the first directory found + break +done exec $0.bin "$@"