blob: 4abb4a953ee7752c753df299e907242910df7ac8 (
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
48
49
50
51
52
53
54
55
56
57
|
#!/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="linux-x86_64"
#PLATFORMS="darwin-i386"
PLATFORMS="windows-x86"
for FILE in ${PLATFORMS}; do
PLATFORM=`basename $FILE`
echo $FILE
if [ "$PLATFORM" != "include" ]; then
if [[ "$PLATFORM" == *windows* ]]; then
tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE}
else
if [[ "$PLATFORM" == *darwin* ]]; then
tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/libv8*' --exclude='lib/*_d.a' ${FILE}
else
tar cvzf uscxml-prebuilt-${PLATFORM}.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' --exclude='lib/*_d.a' ${FILE}
fi
fi
scp uscxml-prebuilt-${PLATFORM}.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
rm uscxml-prebuilt-${PLATFORM}.tgz
else
tar cvzf include.tgz --exclude='*/.DS_Store' --exclude='VERSION.txt' ${FILE}
scp include.tgz ${USCXML_PREBUILT_HOST}:${USCXML_PREBUILT_PATH}/${VERSION}
rm include.tgz
fi
done
|