Skip to content

Commit

Permalink
Only build new snapshot if new changes exist.
Browse files Browse the repository at this point in the history
Check the date of the last build against the official
repo on amsterdam.  If no new changes, don't build.
  • Loading branch information
sit committed Nov 3, 2007
1 parent c9ece59 commit 7c90591
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dist/build-chord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
BUILDROOT=$1
PUBLISHROOT=$2

REPO=/home/am9/public-hg/dht.hg

if [ -z "$BUILDROOT" ]; then
echo "Must specify a build root!" 1>&2
exit 1
Expand All @@ -28,6 +30,14 @@ cd $BUILDROOT
exec >build-$today.log
exec 2>&1

t=$(stat -f "%Sm" $PUBLISHROOT)
if [ $(hg -R $REPO log -d "> $t" | grep -c changeset) -eq 0 ];
then
echo "No new changes since $t"
exit 0
fi
echo "Re-building with changes since $t"

hg clone /home/am9/public-hg/dht.hg dht
cd dht
PKG_CONFIG_PATH=:/usr/local/libdata/pkgconfig:/usr/X11R6/libdata/pkgconfig PATH=/usr/local/gnu-autotools/bin:$PATH export PKG_CONFIG_PATH PATH
Expand Down

0 comments on commit 7c90591

Please sign in to comment.