diff options
author | ceros7 <ceros7@svn> | 2010-05-16 17:45:16 +0000 |
---|---|---|
committer | ceros7 <ceros7@svn> | 2010-05-16 17:45:16 +0000 |
commit | 0164dc3fa4aaea2c256f6276105e4d8d86d5ffd1 (patch) | |
tree | fea24d3886e962ccd0a49fbc7d1bf1846a19ca4d /tools | |
parent | 4c600cf85d1a261327810a8df1a33e4877509620 (diff) |
Support setting the libdir path with xbmc script to support multiarch better.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30228 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Linux/xbmc.sh.in | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tools/Linux/xbmc.sh.in b/tools/Linux/xbmc.sh.in index 91dc04a02d..5b74ea81a6 100644 --- a/tools/Linux/xbmc.sh.in +++ b/tools/Linux/xbmc.sh.in @@ -18,12 +18,29 @@ # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # http://www.gnu.org/copyleft/gpl.html +SAVED_ARGS="$@" +LIBDIR="@prefix@/lib" + +# Check for some options used by this script +while [ "$#" -gt "0" ] +do + case "$1" in + --setlibdir) + LIBDIR="$2" + shift; shift + ;; + *) + shift + ;; + esac +done + single_stacktrace() { find $1 -maxdepth $2 -name 'core*' -exec \ echo "=====> Core file: {}" 2> /dev/null >> $FILE \; -exec \ echo " ========================================= " 2> /dev/null >> $FILE \; -exec \ - gdb @prefix@/lib/xbmc/xbmc.bin --core={} --batch -ex "thread apply all bt" 2> /dev/null >> $FILE \; -exec \ + gdb "$LIBDIR/xbmc/xbmc.bin" --core={} --batch -ex "thread apply all bt" 2> /dev/null >> $FILE \; -exec \ rm -f {} \; } @@ -55,7 +72,7 @@ print_crash_report() if [ $XBMC_HOME ]; then BASEDIR=$XBMC_HOME else - BASEDIR=@prefix@/lib/xbmc/ + BASEDIR="$LIBDIR/xbmc/" fi single_stacktrace $BASEDIR 5 # find in user xbmc dir @@ -80,7 +97,7 @@ print_crash_report() echo "Crash report available at $PWD/$FILE" } -python @prefix@/share/xbmc/FEH.py "$@" +python @prefix@/share/xbmc/FEH.py "$SAVED_ARGS" if [ $? -ne 0 ]; then exit 0 fi @@ -89,7 +106,7 @@ ulimit -c unlimited while [ $(( $LOOP )) = "1" ] do LOOP=0 - @prefix@/lib/xbmc/xbmc.bin "$@" + "$LIBDIR/xbmc/xbmc.bin" "$SAVED_ARGS" RET=$? if [ $(( $RET == 65 )) = "1" ] then # User requested to restart app |