summarylogtreecommitdiffstats
path: root/chromium-snapshot-bin
blob: 5f79eb55c8572ca98f7074e3bf471bfa5cb04c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# Allow users to override command-line options
if [[ -f ~/.config/chromium-flags.conf ]]; then
   CHROMIUM_USER_FLAGS="$(cat ~/.config/chromium-flags.conf)"
fi

# Detect Pepper Flash
for i in '/opt/google/chrome-unstable' '/usr/lib'; do
   if [[ -f $i/PepperFlash/libpepflashplayer.so ]]; then
      PepperFlash="$i/PepperFlash/libpepflashplayer.so"
      PepperFlashVersion="$(grep 'version' $i/PepperFlash/manifest.json | cut -d '"' -f4)"
      CHROMIUM_USER_FLAGS+=" --ppapi-flash-path=$PepperFlash --ppapi-flash-version=$PepperFlashVersion"
      continue
   fi
done

# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="$(readlink -f $0)"
export CHROME_DESKTOP="$0.desktop"

# Launch
exec /opt/chromium-snapshot/chrome $CHROMIUM_USER_FLAGS $@