Magellan Linux

Contents of /alx-src/branches/alxconf-060/plugins/firefox/plugin.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3503 - (show annotations) (download) (as text)
Thu Apr 19 12:17:20 2012 UTC (12 years ago) by niro
File MIME type: application/x-sh
File size: 1466 byte(s)
-added autostart support for plugins
1 # this script gets included by config_sessions
2
3 PLUGIN_NAME="firefox"
4 PLUGIN_MENUITEM_NAME="${PLUGIN_NAME}"
5 PLUGIN_MENUITEM_EXEC="${PLUGIN_NAME}"
6 PLUGIN_MENUITEM_PARAM=""
7 PLUGIN_MENUITEM_WORKDIR=""
8 PLUGIN_MENUITEM_ICON="${PLUGIN_NAME}.png"
9
10 PLUGIN_AUTOSTART=0
11
12 PLUGIN_PACKAGES="glib2 atk pango cairo gdk-pixbuf gtk2+ sqlite unzip libidl nspr nss mozilla-firefox mozilla-firefox-i18n-de"
13
14 install_plugin()
15 {
16 local i
17 for i in ${PLUGIN_PACKAGES}
18 do
19 if [[ -z $(magequery -n ${i}) ]]
20 then
21 MAGE_BOOTSTRAP=true mage install ${i}
22 mage clean
23 fi
24 done
25 }
26
27 setup_plugin()
28 {
29 return 0
30 }
31
32 # create desktop buttons
33 create_menuitem()
34 {
35 # don't touch these echo, define variables above
36 echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
37 echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\""
38 echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\""
39 echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\""
40 echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\""
41 }
42
43 autostart_plugin()
44 {
45 echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\""
46 }
47
48 uninstall_plugin()
49 {
50 local i
51 for i in ${PLUGIN_PACKAGES}
52 do
53 if [[ -n $(magequery -n ${i}) ]]
54 then
55 MAGE_BOOTSTRAP=true mage uninstall ${i}
56 mage clean
57 fi
58 done
59
60 mage clean
61 }
62
63 case $1 in
64 install) install_plugin ;;
65 setup) setup_plugin ;;
66 menuitem) create_menuitem ;;
67 autostart) autostart_plugin ;;
68 uninstall) uninstall_plugin ;;
69 *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
70 esac