build.sh to automate builds
authorPeter Arrenbrecht <peter.arrenbrecht@gmail.com>
Thu, 17 Jul 2008 20:22:26 +0200
changeset 4 de79ef5d609d
parent 3 803cf5c97621
child 5 b9fa7afdfbd5
build.sh to automate builds
.hgignore
README
build.sh
--- a/.hgignore	Thu Jul 17 19:42:00 2008 +0200
+++ b/.hgignore	Thu Jul 17 20:22:26 2008 +0200
@@ -3,4 +3,6 @@
 \.log$
 ^stamp-
 ^tortoisehg/
+^build/
+^dist/
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Thu Jul 17 20:22:26 2008 +0200
@@ -0,0 +1,5 @@
+How to make the debian package:
+
+* Run `./build.sh /path/to/a/tortoisehg/repo`.
+* Find the final package in dist/, intermediate files in build/.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build.sh	Thu Jul 17 20:22:26 2008 +0200
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+if [ ! -e build.sh ]; then
+	echo "Not in thg-debian repo."
+	exit
+fi
+if [ "$1" == "" ]; then
+	echo "Syntax: build.sh thg-repo-path"
+	exit
+fi
+thgrepo=$1
+
+rm build -rf
+mkdir -p build/src
+hg -R $thgrepo archive -r0.4rc2 build/src
+mkdir build/src/debian
+hg archive build/src/debian
+
+mkdir -p dist
+distdir=$(pwd)/dist
+pushd build/src/
+dpkg-buildpackage -rfakeroot
+fakeroot -- dpkg-deb --build debian/tortoisehg $distdir
+popd
+