|
@@ -0,0 +1,25 @@
|
|
|
+#!/bin/sh
|
|
|
+
|
|
|
+directory="/var/tmp/a2-cooperative/"
|
|
|
+update () { svn checkout --non-interactive --quiet --username eth.a2guest --password a2guest https://svn.inf.ethz.ch/svn/lecturers/a2/trunk/tools/builds/a2 "$directory" && make --directory "$directory" --quiet oberon && version=$(svnversion "$directory/source"); }
|
|
|
+check () { make --question --directory "$directory" --quiet build platform="$target"; }
|
|
|
+build () { timeout 1h make --directory "$directory" --quiet build platform="$target"; }
|
|
|
+notify () { echo "$output" | sendbuild "A2 Cooperative Builds" "$target" "$version" "$status"; }
|
|
|
+
|
|
|
+update || exit 1
|
|
|
+
|
|
|
+process ()
|
|
|
+{
|
|
|
+ local target="$1"
|
|
|
+ check && exit 0
|
|
|
+ local status="Building" output=""
|
|
|
+ notify
|
|
|
+ trap notify exit
|
|
|
+ trap "status=Aborted" int term kill
|
|
|
+ status="Failed" output=$(build 2>&1)
|
|
|
+ test $? -eq 0 && status="Succeeded" output=""
|
|
|
+ trap exit
|
|
|
+ notify
|
|
|
+}
|
|
|
+
|
|
|
+process Linux64C &
|