Annotation of /alx-src/branches/alxconf-060/plugins/rdesktop/plugin.sh
Parent Directory | Revision Log
Revision 3391 -
(hide annotations)
(download)
(as text)
Wed Mar 28 15:04:52 2012 UTC (12 years, 1 month ago) by niro
File MIME type: application/x-sh
File size: 1205 byte(s)
Wed Mar 28 15:04:52 2012 UTC (12 years, 1 month ago) by niro
File MIME type: application/x-sh
File size: 1205 byte(s)
-added rdesktop plugin
1 | niro | 3391 | # this script gets included by config_sessions |
2 | |||
3 | PLUGIN_NAME="rdesktop" | ||
4 | PLUGIN_MENUITEM_NAME="" | ||
5 | PLUGIN_MENUITEM_EXEC="" | ||
6 | PLUGIN_MENUITEM_PARAM="" | ||
7 | PLUGIN_MENUITEM_WORKDIR="" | ||
8 | PLUGIN_MENUITEM_ICON="" | ||
9 | |||
10 | PLUGIN_PACKAGES="openssl rdesktop" | ||
11 | |||
12 | install_plugin() | ||
13 | { | ||
14 | local i | ||
15 | for i in ${PLUGIN_PACKAGES} | ||
16 | do | ||
17 | if [[ -z $(magequery -n ${i}) ]] | ||
18 | then | ||
19 | MAGE_BOOTSTRAP=true mage install ${i} | ||
20 | mage clean | ||
21 | fi | ||
22 | done | ||
23 | } | ||
24 | |||
25 | setup_plugin() | ||
26 | { | ||
27 | return 0 | ||
28 | } | ||
29 | |||
30 | # create desktop buttons | ||
31 | create_menuitem() | ||
32 | { | ||
33 | # don't touch these echo, define variables above | ||
34 | echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" | ||
35 | echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\"" | ||
36 | echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\"" | ||
37 | echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\"" | ||
38 | echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\"" | ||
39 | } | ||
40 | |||
41 | uninstall_plugin() | ||
42 | { | ||
43 | local i | ||
44 | for i in ${PLUGIN_PACKAGES} | ||
45 | do | ||
46 | if [[ -n $(magequery -n ${i}) ]] | ||
47 | then | ||
48 | MAGE_BOOTSTRAP=true mage uninstall ${i} | ||
49 | mage clean | ||
50 | fi | ||
51 | done | ||
52 | |||
53 | mage clean | ||
54 | } | ||
55 | |||
56 | case $1 in | ||
57 | install) install_plugin ;; | ||
58 | setup) setup_plugin ;; | ||
59 | menuitem) create_menuitem ;; | ||
60 | uninstall) uninstall_plugin ;; | ||
61 | *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;; | ||
62 | esac |