-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload_nightly_build.sh
executable file
·78 lines (63 loc) · 1.89 KB
/
upload_nightly_build.sh
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#
# scirpt to upload a file on the 2dx.org website
#
# Marcel Arheit 21.01.2011
SYSTEM=`uname`
if [ $SYSTEM = "Darwin" ]
then
source $HOME/.profile
fi
#URL=http://www.2dx.unibas.ch/nightly_build
#URL=http://www.2dx.unibas.ch/download/2dx-software/2dx-installer/nightly-build
echo '*############################################################################*'
echo '| Locating the file |'
echo '*============================================================================*'
echo '| |'
if [ $# -lt 2 ]
then
echo "No file specified"
echo "Usage: `basename $0:` <file> <destination>" >&2
echo 'Aborting!'
exit 1
fi
FILE=$1
URL=$2
if [ ! -f $FILE ]; then
"Could not find file $FILE"
exit 2;
fi
echo '| |'
echo '*============================================================================*'
echo ''
echo ''
echo ''
echo ''
echo '*############################################################################*'
echo '| Uploading the file |'
echo '*============================================================================*'
echo '| |'
echo "Uploading $FILE to $URL"
cadaver $URL <<EOT
put $FILE
quit
EOT
if [ $? -gt 0 ]; then
exit 3;
fi
echo "cadaver $URL <<EOT
put $FILE
quit
EOT"
#echo svn up || (echo "Could not update the repository"; exit 3)
#svn up || (echo "Could not update the repository"; exit 3)
#if [ $? -gt 0 ]; then
# exit 3;
#fi
echo '| |'
echo '*============================================================================*'
echo ''
echo ''
echo ''
echo ''
exit 0