Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3504 - (hide annotations) (download) (as text)
Thu Apr 19 13:27:58 2012 UTC (12 years ago) by niro
File MIME type: application/x-sh
File size: 1390 byte(s)
-export PLUGIN_MENUITEM_NAME in autostart function which is used as name for the generated sh script
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 niro 3504 echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
47 niro 3503 }
48    
49 niro 2749 uninstall_plugin()
50     {
51     local i
52     for i in ${PLUGIN_PACKAGES}
53     do
54     if [[ -n $(magequery -n ${i}) ]]
55     then
56     MAGE_BOOTSTRAP=true mage uninstall ${i}
57     mage clean
58     fi
59     done
60    
61     mage clean
62     }
63    
64     case $1 in
65     install) install_plugin ;;
66 niro 2779 setup) setup_plugin ;;
67 niro 2749 menuitem) create_menuitem ;;
68     uninstall) uninstall_plugin ;;
69 niro 3503 autostart) autostart_plugin ;;
70 niro 2749 *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
71     esac