gtk/chromium/chromium.install

44 lines
1.2 KiB
Plaintext

[ -f extra/etc/chromium-browser/default ] && _default='extra/etc/chromium-browser/default'
[ -f extra/etc/chromium/default ] && _default='extra/etc/chromium/default'
flashver=11.8.800.154
instructions() {
/bin/cat << EOF
Disable all other flash plugins:
Type chrome://plugins/ in the adress bar and press Enter
Click on Details button on the top right
Click on Disable near all the Flash plugins except the first one
EOF
}
post_install() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
post_upgrade
instructions
}
post_upgrade() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
if [[ $(cat "$_default") == *ppapi* ]]; then
sed -i "s/ppapi-flash-version=.*[0-9]/ppapi-flash-version=$flashver/g" "$_default"
else
sed -i '/CHROMIUM_FLAGS/s|"$| --ppapi-flash-path=/extra/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version='$flashver'"|' "$_default"
fi
}
post_remove() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
if [ -f "$_default" ]; then
sed -i 's| --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=1.*[0-999]||' "$_default"
else
: # do nothing
fi
}