Magellan Linux

Annotation of /alx-src/branches/alxconf-060/plugins/flashplayer/plugin.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3503 - (hide 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: 1333 byte(s)
-added autostart support for plugins
1 niro 2749 # this script gets included by config_sessions
2    
3     PLUGIN_NAME="flashplayer"
4     PLUGIN_MENUITEM_NAME=""
5     PLUGIN_MENUITEM_EXEC=""
6     PLUGIN_MENUITEM_PARAM=""
7     PLUGIN_MENUITEM_WORKDIR=""
8     PLUGIN_MENUITEM_ICON=""
9    
10 niro 3503 PLUGIN_AUTOSTART=0
11    
12 niro 2749 PLUGIN_PACKAGES="curl flashplayer"
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 niro 2779 setup_plugin()
28     {
29     return 0
30     }
31    
32 niro 2749 # 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 niro 3503 autostart_plugin()
44     {
45     echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\""
46     }
47    
48 niro 2749 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 niro 2779 setup) setup_plugin ;;
66 niro 2749 menuitem) create_menuitem ;;
67     uninstall) uninstall_plugin ;;
68 niro 3503 autostart) autostart_plugin ;;
69 niro 2749 *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
70     esac