aboutsummaryrefslogtreecommitdiff
path: root/scripts/automated-builder.sh
blob: 6847c719cc3fde09a5cc79eda979ced92a3b032d (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
#!/bin/sh

# this script is the first attempt to have an automated updater and builder

SYSTEM=`uname -s`
DATE=`date +%Y-%m-%d`
TIME=`date +%H.%M.%S`
SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`
LOGFILE=/home/pd/logs/${DATE}_-_${TIME}_-_${SCRIPT}_-_${SYSTEM}.txt

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" 

cd ${auto_build_root_dir}/packages
# let rsync handle the cleanup
#make unpatch_pd

rsync -av --delete rsync://128.238.56.50/pure-data/ ${auto_build_root_dir}/

BUILD_DIR=.
if [ "$SYSTEM" == "Linux" ]; then
	 BUILD_DIR=linux_make
fi

if [ "$SYSTEM" == "Darwin" ]; then
	 BUILD_DIR=darwin_app
fi

cd "$BUILD_DIR"
pwd
make distclean
make package_clean
rm -rf build
#make -C "${auto_build_root_dir}/packages" patch_pd
make install && make package

#make test_package
make test_locations