root / tmp / org.txm.setups / PublishPluginUpdateSite.sh @ 2777
History | View | Annotate | Download (1.1 kB)
1 |
# this script needs that you create a public key for SF |
---|---|
2 |
echo "Sending RCP plugins to update site..." |
3 |
UPDATESITE="/var/lib/tomcat6/webapps/updates/plugins$1" |
4 |
SERVER="txm.ish-lyon.cnrs.fr" |
5 |
USER="txm" |
6 |
|
7 |
if [ "$1" = "" ]; then |
8 |
echo "uploading to default repository" |
9 |
elif [ $1 = "alpha" ]; then |
10 |
echo "uploading to the '$1' repository" |
11 |
elif [ $1 = "beta" ]; then |
12 |
echo "uploading to the '$1' repository" |
13 |
elif [ $1 = "dev" ]; then |
14 |
echo "uploading to the '$1' repository" |
15 |
else |
16 |
echo "'$1': invalid parameter" |
17 |
exit 1; |
18 |
fi |
19 |
|
20 |
# moving to src plugin site |
21 |
if [ "$1" = "" ]; then |
22 |
cd "../../TXMStablePlugins.site" |
23 |
elif [ $1 = "alpha" ]; then |
24 |
cd "../../TXMAlphaPlugins.site" |
25 |
elif [ $1 = "beta" ]; then |
26 |
cd "../../TXMBetaPlugins.site" |
27 |
elif [ $1 = "dev" ]; then |
28 |
cd "../../TXMDevPlugins.site" |
29 |
else |
30 |
echo "$1: invalid parameter2" |
31 |
exit 1; |
32 |
fi |
33 |
|
34 |
if [ $? != 0 ]; then |
35 |
echo "** updatePluginsUpdateSites.sh : failed to find ../../TXM plugins.site" |
36 |
exit 1; |
37 |
fi |
38 |
|
39 |
# DO IT ! |
40 |
echo "Sending plugins..." |
41 |
scp -r * $USER@$SERVER:$UPDATESITE |
42 |
if [ $? != 0 ]; then |
43 |
echo "** updateTXMUpdateSites.sh : failed to update" |
44 |
exit 1; |
45 |
fi |