blob: 81df0f48c0556154a430d062f6604af5045cd4b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/bash
set -e
ME=`basename $0`
DIR="$( cd "$( dirname "$0" )" && pwd )"
CWD=`pwd`
cd $DIR
if [ "$USCXML_PREBUILT_HOST" == "" ]; then
USCXML_PREBUILT_HOST="admin@uscxml.tk.informatik.tu-darmstadt.de"
fi
USCXML_PREBUILT_PATH="/var/www/html/uscxml/prebuilt"
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "$ME <prebuilt dir> <version>"
exit
fi
if [ ! -d $1 ]; then
echo "$1: no such directory"
exit
fi
VERSION=$2
cd ../prebuilt
ssh ${USCXML_PREBUILT_HOST} mkdir -p ${USCXML_PREBUILT_PATH}/${VERSION}
PLATFORMS=`find . -maxdepth 1 -type d -regex ./[^\.].*`
PLATFORMS="include"
for FILE in ${PLATFORMS}; do
PLATFORM=`basename $FILE`
if [ "$PLATFORM" != "include" ]; then
echo $FILE
tar cvzf uscxml-prebuilt-${PLATFORM}.tgz ${FILE}
scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
rm uscxml-prebuilt-${PLATFORM}.tgz
else
tar cvzf include.tgz ${FILE}
scp include.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
rm include.tgz
fi
done
|