[pbuilder] 02/02: t/testlib: autodetect if this is running from a git checkout and automatically set PBUILDER_CHECKOUT

Mattia Rizzolo mattia at debian.org
Sat Dec 31 14:29:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pbuilder.

commit 1b915aac16df539a787ed528dac3b869f52a4a30
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Dec 31 15:29:17 2016 +0100

    t/testlib: autodetect if this is running from a git checkout and automatically set PBUILDER_CHECKOUT
---
 t/testlib.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/t/testlib.sh b/t/testlib.sh
index c40f0be..a962fec 100644
--- a/t/testlib.sh
+++ b/t/testlib.sh
@@ -18,6 +18,10 @@ set -e
 # installed files (from PBUILDER_TEST_ROOT, which is a copy of PBUILDER_ROOT)
 PBUILDER_CHECKOUT="${PBUILDER_CHECKOUT:-}"
 
+if [ -d .git -a -z "$PBUILDER_CHECKOUT" ]; then
+    PBUILDER_CHECKOUT=.
+fi
+
 if [ -z "$PBUILDER_CHECKOUT" ]; then
     # these currently don't need to be exported
     PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list