6 # Fabien Tassin <fta@sofaraway.org>
7 # License: GPLv2 or later
9 APPNAME=chromium-browser
10 LIBDIR=/usr/lib/chromium-browser
14 echo "$APPNAME [-h|--help] [-g|--debug] [options] [URL]"
16 echo " -g or --debug Start within $GDB"
17 echo " -h or --help This help screen"
20 # FFmpeg needs to know where its libs are located
21 if [ "Z$LD_LIBRARY_PATH" != Z ] ; then
22 LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH
24 LD_LIBRARY_PATH=$LIBDIR
26 export LD_LIBRARY_PATH
29 while [ $# -gt 0 ]; do
37 -- ) # Stop option prcessing
45 if [ $want_debug -eq 1 ] ; then
46 if [ ! -x $GDB ] ; then
47 echo "Sorry, can't find usable $GDB. Please install it."
50 tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; }
51 trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
52 echo "set args ${1+"$@"}" > $tmpfile
54 echo "# LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
55 echo "$GDB $LIBDIR/$APPNAME -x $tmpfile"
56 $GDB "$LIBDIR/$APPNAME" -x $tmpfile
59 exec $LIBDIR/$APPNAME "$@"