Lines 8-13
Link Here
|
8 |
export CHROME_WRAPPER="`readlink -f "$0"`" |
8 |
export CHROME_WRAPPER="`readlink -f "$0"`" |
9 |
|
9 |
|
10 |
PROGDIR="`dirname "$CHROME_WRAPPER"`" |
10 |
PROGDIR="`dirname "$CHROME_WRAPPER"`" |
|
|
11 |
PROGNAME="`basename "$0"`" |
11 |
|
12 |
|
12 |
case ":$PATH:" in |
13 |
case ":$PATH:" in |
13 |
*:$PROGDIR:*) |
14 |
*:$PROGDIR:*) |
Lines 19-25
Link Here
|
19 |
;; |
20 |
;; |
20 |
esac |
21 |
esac |
21 |
|
22 |
|
|
|
23 |
usage () { |
24 |
echo "$PROGNAME [--temp-profile] [options] [URL]" |
25 |
echo |
26 |
echo " -h or --help This help screen" |
27 |
echo " --temp-profile Start with a new and temporary profile" |
28 |
} |
29 |
|
30 |
want_temp_profile=0 |
31 |
while [ $# -gt 0 ]; do |
32 |
case "$1" in |
33 |
-h | --help | -help ) |
34 |
usage |
35 |
exit 0 ;; |
36 |
--temp-profile ) |
37 |
want_temp_profile=1 |
38 |
shift ;; |
39 |
-- ) # Stop option processing |
40 |
shift |
41 |
break ;; |
42 |
* ) |
43 |
break ;; |
44 |
esac |
45 |
done |
46 |
|
47 |
if [ $want_temp_profile -eq 1 ] ; then |
48 |
TEMP_PROFILE=`mktemp -d` |
49 |
TEMP_PROFILE_FLAG="--user-data-dir=$TEMP_PROFILE" |
50 |
fi |
51 |
|
22 |
# Set the .desktop file name |
52 |
# Set the .desktop file name |
23 |
export CHROME_DESKTOP="chromium-chromium.desktop" |
53 |
export CHROME_DESKTOP="chromium-chromium.desktop" |
24 |
|
54 |
|
25 |
exec "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins "$@" |
55 |
if [ $want_temp_profile -eq 0 ] ; then |
|
|
56 |
exec "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins "$@" |
57 |
else |
58 |
# we can't exec here as we need to clean-up the temporary profile |
59 |
"$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins "$TEMP_PROFILE_FLAG" "$@" |
60 |
rm -rf $TEMP_PROFILE |
61 |
fi |
62 |
|