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

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

ROOT_DIR=/home/pd/auto-build/pd-main/pure-data

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

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


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

echo "root: $auto_build_root_dir" 

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


cd ${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}/