aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build/pd-main-auto-builder.sh
blob: 1b35b2c32288a9764feaa9d1bcee5c0086407504 (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
#!/bin/sh

HOSTNAME=`hostname | sed 's|\([a-zA-Z0-9-]*\)\..*|\1|'`
SYSTEM=`uname -s`
DATE=`date +%Y-%m-%d`
TIME=`date +%H.%M.%S`
SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`

case $SYSTEM in 
	 Linux)
		  configure_options="--enable-alsa --enable-jack"
		  platform_name=`uname -m`
		  ;;
	 Darwin)
		  configure_options=""
		  platform_name=`uname -p`
		  ;;
	 MINGW*)
		  configure_options=""
		  platform_name=i386
		  ;;
	 CYGWIN*)
		  configure_options=""
		  platform_name=i386
		  ;;
	 *)
		  echo "ERROR: Platform $SYSTEM not supported!"
		  exit
		  ;;
esac

# convert into absolute path
cd `echo $0 | sed 's|\(.*\)/.*$|\1|'`/../..
auto_build_root_dir=`pwd`
echo "root: $auto_build_root_dir" 

package_name="/tmp/pd-${DATE}-${SYSTEM}-${HOSTNAME}-${platform_name}.tar.bz2"

# let rsync handle the cleanup with --delete
rsync -av --delete rsync://128.238.56.50/distros/pd-main/ \
	 ${auto_build_root_dir}/


cd ${auto_build_root_dir}/pd/src && \
	 autoconf && \
	 ./configure $configure_options && \
	 make  && \
	 cd ../../ && \
	 tar cjf $package_name pd && \
	 rsync -a ${package_name} rsync://128.238.56.50/upload/${DATE}/ && \
	 echo SUCCESS
rm -f -- $package_name