aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-09-17 16:14:02 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-09-17 16:14:02 +0000
commit39b22a89b899515e43b959fd43fbc1ddb1ac096b (patch)
tree39f2856d59a8e0c0181639795487a4d56accc99c /examples
parentef02c579ea1057028bd8a8fe394dd413f09a8e3d (diff)
downloadpbuilder-39b22a89b899515e43b959fd43fbc1ddb1ac096b.tar
pbuilder-39b22a89b899515e43b959fd43fbc1ddb1ac096b.tar.gz
example hooks: keep /tmp/buildd as a fallback option in case BUILDDIR is not setted
Who knows what people want to do with those scripts...
Diffstat (limited to 'examples')
-rw-r--r--examples/B90lintian2
-rw-r--r--examples/B90list-missing1
-rw-r--r--examples/B91debc1
-rw-r--r--examples/B91dpkg-i1
-rw-r--r--examples/B92test-pkg2
-rw-r--r--examples/C10shell1
-rwxr-xr-xexamples/C11screen1
7 files changed, 9 insertions, 0 deletions
diff --git a/examples/B90lintian b/examples/B90lintian
index f6aa563..3f48ab9 100644
--- a/examples/B90lintian
+++ b/examples/B90lintian
@@ -2,6 +2,8 @@
set -e
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
+
install_packages() {
apt-get -y "${APTGETOPT[@]}" install "$@"
}
diff --git a/examples/B90list-missing b/examples/B90list-missing
index 72e0286..558732e 100644
--- a/examples/B90list-missing
+++ b/examples/B90list-missing
@@ -5,6 +5,7 @@
# Depends on CDBS module in debian/rules:
# include /usr/share/cdbs/1/rules/utils.mk
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
echo "I: checking for missing files."
cd "$BUILDDIR"/*/debian
cd ..
diff --git a/examples/B91debc b/examples/B91debc
index 61690c9..180efdb 100644
--- a/examples/B91debc
+++ b/examples/B91debc
@@ -3,6 +3,7 @@
#
# 343894: a script to run debc command, contributed from q-funk.
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
apt-get install -y "${APTGETOPT[@]}" devscripts
cd "$BUILDDIR"/*/debian
cd ..
diff --git a/examples/B91dpkg-i b/examples/B91dpkg-i
index 55bd7c5..acc1cdd 100644
--- a/examples/B91dpkg-i
+++ b/examples/B91dpkg-i
@@ -6,6 +6,7 @@
echo "Trying to install resulting packages and test upgrades"
set -ex
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
PKGNAMES=$(cd "$BUILDDIR" && ls -1 *.deb | sed 's/_.*$//' )
diff --git a/examples/B92test-pkg b/examples/B92test-pkg
index 31e4aba..15c6017 100644
--- a/examples/B92test-pkg
+++ b/examples/B92test-pkg
@@ -7,6 +7,8 @@
#
set -e
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
+
echo "Installing the prerequisites"
for PKG in $(ls "$BUILDDIR"/*.deb | sed -e's,.*/,,;s,_.*,,' ); do
apt-get install -y --force-yes "$PKG" || true
diff --git a/examples/C10shell b/examples/C10shell
index e547094..6fa0cb6 100644
--- a/examples/C10shell
+++ b/examples/C10shell
@@ -2,6 +2,7 @@
# example file to be used with --hookdir
#
# invoke shell if build fails.
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
apt-get install -y "${APTGETOPT[@]}" vim less
cd "$BUILDDIR"/*/debian/..
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
diff --git a/examples/C11screen b/examples/C11screen
index c26b2e2..d89c9f9 100755
--- a/examples/C11screen
+++ b/examples/C11screen
@@ -4,6 +4,7 @@
# invoke GNU screen if build fails.
export debian_chroot="pbuilder"
+BUILDDIR="${BUILDDIR:-/tmp/buildd}"
apt-get install -y "${APTGETOPT[@]}" screen vim less
cd "$BUILDDIR/*/debian/.."
screen </dev/tty > /dev/tty 2> /dev/tty