G2A Many GEOs
SHARE
TWEET

Opera postinst script

a guest Sep 29th, 2012 428 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. set -e
  3.  
  4. available()
  5. {
  6.         command -v "$1" >/dev/null 2>&1
  7. }
  8.  
  9. finalize_desktop()
  10. {
  11.         # Menu entries
  12.         if available update-desktop-database
  13.         then
  14.                 update-desktop-database /usr/share/applications
  15.         fi
  16.         if available update-menus
  17.         then
  18.                 update-menus
  19.         fi
  20.         if available update-app-install
  21.         then
  22.                 update-app-install
  23.         fi
  24.         if available update-software-center
  25.         then
  26.                 update-software-center
  27.         fi
  28.  
  29.         # MIME associations
  30.         if available update-mime-database
  31.         then
  32.                 update-mime-database /usr/share/mime
  33.         fi
  34.  
  35.         # Icons
  36.         touch -c /usr/share/icons/hicolor
  37.         if available update-icon-caches
  38.         then
  39.                 update-icon-caches -tq /usr/share/icons/hicolor
  40.         elif available gtk-update-icon-cache
  41.         then
  42.                 gtk-update-icon-cache -tq /usr/share/icons/hicolor
  43.         fi
  44. }
  45.  
  46. . /usr/share/debconf/confmodule
  47.  
  48. case "$1" in
  49.         configure)
  50.                 db_get opera/add-deb-source
  51.                 if $RET
  52.                 then
  53.                         if [ ! -f /etc/apt/sources.list.d/opera.list ]
  54.                         then
  55.                                 cat >/etc/apt/sources.list.d/opera.list <<EOF
  56. # This file makes sure that Opera Browser is kept up-to-date
  57. # as part of regular system upgrades
  58.  
  59. deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
  60.  
  61. # The line above will make sure you get all final public releases.
  62. # Uncomment the following line if you want to get alpha and beta
  63. # releases, too.
  64.  
  65. # deb http://deb.opera.com/opera-beta/ stable non-free #Opera Browser (beta releases)
  66. EOF
  67.                         fi
  68.                 fi
  69.                 if [ -d /etc/update-manager -a ! -f /etc/update-manager/release-upgrades.d/opera.cfg ]
  70.                 then
  71.                         mkdir -p /etc/update-manager/release-upgrades.d
  72.                         cat >/etc/update-manager/release-upgrades.d/opera.cfg <<EOF
  73. # Added by Opera to prevent disabling of deb.opera.com sources on
  74. # distribution release upgrade.
  75. [ThirdPartyMirrors]
  76. opera/opera=http://deb.opera.com/opera/
  77. opera/opera-beta=http://deb.opera.com/opera-beta/
  78. EOF
  79.                 fi
  80.                 if available apt-key
  81.                 then
  82.                         for id in 6A423791 9D1A0061 4E7532C8
  83.                         do
  84.                                 if apt-key list | grep -qF $id
  85.                                 then
  86.                                         apt-key del $id >/dev/null
  87.                                         RET=true
  88.                                 fi
  89.                         done
  90.                         if apt-key list | grep -qF 336064B5
  91.                         then
  92.                                 RET=true
  93.                         fi
  94.                         if $RET
  95.                         then
  96.                                 if [ "$(date +%F)" '>' 2013-01-11 ]
  97.                                 then
  98.                                         ! apt-key del 336064B5 >/dev/null 2>&1
  99.                                 else
  100.                                         apt-key add - >/dev/null <<EOF
  101. -----BEGIN PGP PUBLIC KEY BLOCK-----
  102. Version: GnuPG v1.4.1 (GNU/Linux)
  103.  
  104. mQGiBE65XDERBACmaJNnQncHL12eyracQsYJJBNP4woPB4SKCCXCidTc/nnqcJZR
  105. Sn4BgCnsvND1PrYOfsmIMPh+8/B+iOSqLnqtsyWedpPrR/gP2p0rQ9FA3cnB8A0K
  106. 8j8f5KD+9rpV71tuybyWseuLawLk5V+Nl7xNKlweDMgu1uEjYgsIQcc/MwCg+ktT
  107. dWQ3LL2H0/qk0DkkslS+GjkD/10acrKXrWYIMFt+6wI9KSU+pN6couqnRd11GpPz
  108. p+Jj6kFyhVOfC56a3asaxp31s9EaJH/oKmaxR609XfWRJ88PI8+yJN4TYI4BpWiE
  109. uVOF9rp5jGtkmQ9KoEATsrKDixXYVbsEanmy9gAeoUJ8hTtUSI0NX3LK8ljQohpm
  110. RO6sA/49R4pmhDLRcPlFytSvKSuCv4HnH/SysUu3wYo4CLP+/A1K8mR2SNtFCyxE
  111. yGBvaFhutkWdJejl4l/E45bFUBp7OeytSwE0kENaTpSIWSkb3iD1gF9f9nVXg1mb
  112. CMfdNms5dQB14pR71/as0d6TFlGJsOTzt03kc4O837iESRRAQLRGT3BlcmEgU29m
  113. dHdhcmUgQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgMjAxMiA8cGFja2Fn
  114. ZXJAb3BlcmEuY29tPohkBBMRAgAkBQJOuVwxAhsDBQkCNuUABgsJCAcDAgMVAgMD
  115. FgIBAh4BAheAAAoJEKr/SlszYGS1NcUAni5loVMfasucaQNItG8SacBV3OhVAKD4
  116. EgXgY5Uf82CLaYv30X8ramtBx7kEDQROuV0+EBAA5tvYjeO7hv64cYFwLRZZE7EZ
  117. JhREsxeNpv1Ho4jMJ/A0bwboX6TSthe++a3ymZgFUSRMz/Z371l4884QAUUkpcug
  118. AB/WhXi6yit1+iHZ+4D2QLavPUK1Z9kO2lQPOrw+wDGRok6OshrdqqdoPly16n1F
  119. 6HF06OVlVibOWEHhXs4Cnh7aNcuvfwkC20KQyanUcYNs0XHzKcyyeo4aDx6q2a+e
  120. n6VZCbW3iNx0QF18OcikS/enpALmEx0L0C/1IA7LsnRp9sWkiuyuKsa4913wSBeQ
  121. hkRt5aEhxChWNguYbyA1/RW0pkNXDcK8PgH0yPxLL5nj3yfcV4i0M2QTqOJp3Nwp
  122. YuNjXpV/hzr2fBPF1jFaNcAG4e3wdf0HEWKzqf/iJGVGyIbjuJuwiRkr5kpBmmG8
  123. fiN+TU7Pu4el5FtTL9FI+ggr2Y/Y3ONlmIEVH67Ar5DAO2cY7KYnZ/ASnx/RwzTe
  124. gE8fnrWkMa48O8JJrOXwx6xB2wD7ml6byImArA++hGDJiAzzHaxgt0rkvUKEoLvQ
  125. 7LziVXJR/++8wREPUIkk4a40gyeopg1JGDm7oPpQ5I6/I8hwyOgvErWlyN0OYt6L
  126. H6pY5nxipax/p24HGcmLcGV12dinbhBbJDB9zM1HF1clbmjPPA2X3GqRU4JsZJZK
  127. bp5AG6BzLuU5XyjlMwsAAwUP/2/aETRAKVp5p+wO2m4Pypk/G14mhkxlkfm0nTmZ
  128. SNvDrFIzCOy0YpL7U1WH3seYNsFAC8G2D9HNUcywt8Cany7GpJYFb6HqgpXRI6Vm
  129. +hTCKiXg8ioAywv3Lx94TQ/ebySxm85CVEFMikEidtTWdaGXiob4ArBAwmXmgdgA
  130. 9kl+bVqeP1SXEz6S/HOeCXnWosS+pBfKMHCE/TaMyc/I0UdpQOOGUI1D949TD3uJ
  131. ar1fSkBFOmHXzPN+LVqTvkX7Srw7JGdsuju0bOV/nz+WOFHMHWU7guapPSqJXibu
  132. twJ8TrB3V9PC4pFYL+1y406t6O7YgZ39hfsEYuNXrshDlp6c58bFvH45+LSbxh56
  133. lzzcVqtE42Eq9+GN8gYM1c/A/5nF0UYT7lQho2foUNRmlliIC6UX0E7kuDisRwld
  134. E9qcte9VCYHDwkyMutx0NQFfeAR3G0wp3o3h7NmHyhz9sIzC72itiJfvrD05D5CH
  135. B3LJ86SzOAf72FY/aT7UAetD6Rg6MwoGwSIkQZlkaKSehW0ay2LmwqkKQKrEkJpl
  136. M+mah7qBfYjEVjjhQYnOHw5IcmU0mVMq6sIXA9sya6wFbiFihFwMyDm2b8tm93/3
  137. NsjpkjUvBPr8u3FHqv0Ul7XvPPcCoG0ML2wx0L8Ah2PKFAuoJu0Z92sqSiPEjy46
  138. wbWIiE8EGBECAA8FAk65XT4CGwwFCQI25QAACgkQqv9KWzNgZLWkPQCfXG7HKbWp
  139. 2pbzg9I5Pq0K/gQBvVYAoJPiNOFB/yqUdI8HZz8cFDdj+baM
  140. =PwoB
  141. -----END PGP PUBLIC KEY BLOCK-----
  142. EOF
  143.                                 fi
  144.                         fi
  145.                 fi
  146.                 update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/opera 200 \
  147.                         --slave /usr/share/man/man1/x-www-browser.1.gz x-www-browser.1.gz /usr/share/man/man1/opera.1.gz
  148.                 update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser /usr/bin/opera 200 \
  149.                         --slave /usr/share/man/man1/gnome-www-browser.1.gz gnome-www-browser.1.gz /usr/share/man/man1/opera.1.gz
  150.                 if [ -f /etc/opera6rc ]
  151.                 then
  152.                         mv -f /etc/opera6rc /etc/operaprefs_default.ini
  153.                 fi
  154.                 if [ -f /etc/opera6rc.fixed ]
  155.                 then
  156.                         mv -f /etc/opera6rc.fixed /etc/operaprefs_fixed.ini
  157.                 fi
  158.                 finalize_desktop
  159.                 ;;
  160. esac
  161.  
  162. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top