mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
44 lines
973 B
Text
44 lines
973 B
Text
[ -f etc/chromium-browser/default ] && _default='etc/chromium-browser/default'
|
|
[ -f etc/chromium/default ] && _default='etc/chromium/default'
|
|
flashver=12.0.0.77
|
|
|
|
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_upgrade()
|
|
{
|
|
|
|
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=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version='$flashver'"|' "$_default"
|
|
fi
|
|
|
|
}
|
|
|
|
post_install() {
|
|
|
|
post_upgrade
|
|
|
|
instructions
|
|
|
|
}
|
|
|
|
post_remove() {
|
|
|
|
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
|
|
}
|