blob: 448b6edddc8abc071d04ce9fb554007041bab910 (
plain) (
blame)
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
|
#!/bin/sh
[ -z "$JAVA_SDK" ] && ( echo "Variable JAVA_SDK not specified"; exit 1 )
ANDROID_HOME=/home/linuxsoft/apps/android
ANT_HOME=/home/linuxsoft/apps/ant
JAVA_HOME=/home/linuxsoft/apps/$JAVA_SDK
# uses scsh wrapper in ~/bin instead (mics)
#SCSH_HOME=/home/linuxsoft/apps/scsh-rh9
# Mono on linuxsoft is a 32-bit distro
#MONO_HOME=/home/linuxsoft/apps/mono
MONO_HOME=/opt/mono
KVEM_HOME=/home/linuxsoft/apps/java-wtk
RETROWEAVER_HOME=/home/linuxsoft/apps/retroweaver
[ -d "$JAVA_HOME" ] || (echo "Invalid directory $JAVA_HOME"; exit 1 )
PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin
PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$MONO_HOME/bin:$ANDROID_HOME/tools:$KVEM_HOME/bin:~/bin:$PATH
LD_LIBRARY_PATH=/lib:/usr/lib
ANT_OPTS="-Xms1024M -Xmx1024M -XX:MaxPermSize=96M"
BUILD_DATE=`date +"%Y-%m-%d"`
OUTPUT_DIR=~/scala-nightly-test/$JAVA_SDK
TARGET_DIR=$OUTPUT_DIR/$BUILD_DATE-scala2
BUILD_DIR=$TARGET_DIR/scala/build
LATEST_DIR=$TARGET_DIR/scala/dists
NIGHTLY_DIR=/home/linuxsoft/archives/scala/nightly
[ -d "$OUTPUT_DIR" ] || mkdir -p "$OUTPUT_DIR"
JAVACMD=$JAVA_HOME/bin/java
killall -9 scshvm 2>1
killall -9 java 2>1
env PATH="$PATH" ANT_OPTS="$ANT_OPTS" JAVACMD="$JAVACMD" \
ANDROID_HOME="$ANDROID_HOME" RETROWEAVER_HOME="$RETROWEAVER_HOME" \
~/bin/scala2-nightly-test.scm $OUTPUT_DIR
# only build for Java 1.5 is made available on the page
# http://www.scala-lang.org/downloads/distrib/files/nightly/
[ "$JAVA_SDK"="java-1.5" ] || exit 0
if [ -d "$LATEST_DIR" ] && [ `ls "$LATEST_DIR"/*.zip 2>1 | wc -l` -gt 0 ]; then
(rm -rf $NIGHTLY_DIR && mkdir $NIGHTLY_DIR)
(cd $LATEST_DIR && cp *.tgz *.zip *.md5 *.sbp *.advert $NIGHTLY_DIR)
(cd $TARGET_DIR && cp log-scala2 $NIGHTLY_DIR)
(cd $NIGHTLY_DIR && tar xzf scala-*[^sources].tgz)
(cd $NIGHTLY_DIR && for f in *.sbp; do ln -sf $f `echo $f | sed -e 's/\(scala[a-z\-]*[0-9]\+\.[0-9]\+\.[0-9]\+\).*\(\.sbp\)/\1-latest\2/g'`; done)
(cd $NIGHTLY_DIR && for f in *.tgz; do ln -sf $f `echo $f | sed -e 's/\(scala[a-z\-]*[0-9]\+\.[0-9]\+\.[0-9]\+\).*\(\.tgz\)/\1-latest\2/g'`; done)
(cd $NIGHTLY_DIR && for f in *.zip; do ln -sf $f `echo $f | sed -e 's/\(scala[a-z\-]*[0-9]\+\.[0-9]\+\.[0-9]\+\).*\(\.zip\)/\1-latest\2/g'`; done)
fi
if [ -d "$BUILD_DIR/api-compiler" ] && [ -d "$NIGHTLY_DIR/scala/doc/scala" ]; then
cp -r $BUILD_DIR/api-compiler $NIGHTLY_DIR/scala/doc/scala
fi
|