~juan457/+junk/zorba

« back to all changes in this revision

Viewing changes to scripts/build

  • Committer: dan-muresan
  • Date: 2008-06-05 19:42:56 UTC
  • Revision ID: svn-v4:8046edc3-af21-0410-8661-ec7318497eea:trunk/zorba:4051
scripts/ dir; scripts/build

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
cd `dirname $0`/..
 
4
SRC=`pwd`
 
5
 
 
6
REV=$1
 
7
test "$REV" || REV="HEAD"
 
8
svn update -r"$REV" || { echo "Couldn't update source"; exit 1; }
 
9
echo '$'"Rev: $REV "'$' >svn_rev.txt
 
10
 
 
11
BUILD_DIR="$2"
 
12
test "$BUILD_DIR" || BUILD_DIR="$SRC/build_$REV"
 
13
rm -rf "$BUILD_DIR"
 
14
mkdir -p "$BUILD_DIR"
 
15
cd "$BUILD_DIR"
 
16
echo "Sources at $SRC, building in $BUILD_DIR"
 
17
 
 
18
shift 2
 
19
cmake "$SRC" && make -j2 && echo "Your build directory is $BUILD_DIR"