Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)

chromium-pepper-flash pepper.install

By: ava1ar on Jun 20th, 2012  |  syntax: Bash  |  size: 0.98 KB  |  hits: 173  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. [ -f etc/chromium-browser/default ] && _default='etc/chromium-browser/default'
  2. [ -f etc/chromium/default ] && _default='etc/chromium/default'
  3.  
  4. instructions() {
  5.  
  6.   /bin/cat << EOF
  7.  
  8. Disable all other flash plugins:
  9. Type chrome://plugins/ in the adress bar and press Enter
  10. Click on Details button on the top right
  11. Click on Disable near all the Flash plugins except the first one
  12.  
  13. EOF
  14.  
  15. }
  16.  
  17. post_upgrade()
  18. {
  19.  
  20.   if [[ $(cat "$_default") == *ppapi* ]]; then
  21.     sed -i "s/ppapi-flash-version=.*[0-9]/ppapi-flash-version=11.3.31.205/g" "$_default"
  22.   else
  23.     sed -i '/CHROMIUM_FLAGS/s|"$| --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.3.31.205"|' "$_default"
  24.   fi
  25.  
  26. }
  27.  
  28. post_install() {
  29.  
  30.   post_upgrade
  31.  
  32.   instructions
  33.  
  34. }
  35.  
  36. post_remove() {
  37.  
  38.   if [ -f "$_default" ]; then
  39.     sed -i 's| --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=1.*[0-999]||' "$_default"
  40.   else
  41.     : # do nothing
  42.   fi
  43.  
  44. }