aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-10-28 15:50:09 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-11-01 12:33:01 +0000
commite7cc7e7c6457e02ac0df7c87f853e0c5b826e99d (patch)
treea910a280f237c1ee1483800358ed92df892aebd0
parentce75647a9a9ef614c5ea2f45b198f8e79f2063e4 (diff)
downloadpbuilder-e7cc7e7c6457e02ac0df7c87f853e0c5b826e99d.tar
pbuilder-e7cc7e7c6457e02ac0df7c87f853e0c5b826e99d.tar.gz
use relative sources where possible
This way it's a lot easier to test stuff without actually installing it Use BASH_SOURCE, which contains the path of the current script being executed. BASH_SOURCE is clearly a bashism, but it's cheaper than using dirname(1). Thanks to Gianfranco Costamagna for noticing how this bit could have be improved. Gbp-Dch: Short
-rwxr-xr-xpbuilder-buildpackage4
-rwxr-xr-xpbuilder-createbuildenv2
-rw-r--r--pbuilder-modules2
-rwxr-xr-xpbuilder-satisfydepends-experimental4
-rw-r--r--pbuilder-satisfydepends-gdebi2
-rwxr-xr-xpbuilder-updatebuildenv2
6 files changed, 8 insertions, 8 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index daeb077..ae1a0a9 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -21,8 +21,8 @@ export LANG=C
export LC_ALL=C
set -e
-. /usr/lib/pbuilder/pbuilder-checkparams
-. /usr/lib/pbuilder/pbuilder-buildpackage-funcs
+. "${BASH_SOURCE%/*}/pbuilder-checkparams"
+. "${BASH_SOURCE%/*}/pbuilder-buildpackage-funcs"
PACKAGENAME="$1"
if [ ! -f "$PACKAGENAME" ]; then
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index 81c3a81..7f579d2 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -20,7 +20,7 @@
set -e
-. /usr/lib/pbuilder/pbuilder-checkparams
+. "${BASH_SOURCE%/*}/pbuilder-checkparams"
if [ -z "$DISTRIBUTION" ]; then
DISTRIBUTION=sid
diff --git a/pbuilder-modules b/pbuilder-modules
index 0b87104..363f7d7 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -17,7 +17,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-. ./pbuilder-runhooks
+. "${BASH_SOURCE%/*}/pbuilder-runhooks"
function showhelp () {
cat <<EOF
diff --git a/pbuilder-satisfydepends-experimental b/pbuilder-satisfydepends-experimental
index b1de1c7..8da17a5 100755
--- a/pbuilder-satisfydepends-experimental
+++ b/pbuilder-satisfydepends-experimental
@@ -25,7 +25,7 @@
set -e
-. /usr/lib/pbuilder/pbuilder-satisfydepends-funcs
+. "${BASH_SOURCE%/*}/pbuilder-satisfydepends-funcs"
# Use this function to fulfill the dependency (almost)
function checkbuilddep_internal () {
@@ -191,5 +191,5 @@ Copyright 2002-2007 Junichi Uekawa <dancer@debian.org>
EOF
}
-. /usr/lib/pbuilder/pbuilder-satisfydepends-checkparams
+. "${BASH_SOURCE%/*}/pbuilder-satisfydepends-checkparams"
diff --git a/pbuilder-satisfydepends-gdebi b/pbuilder-satisfydepends-gdebi
index 3bd3cf7..77fcd97 100644
--- a/pbuilder-satisfydepends-gdebi
+++ b/pbuilder-satisfydepends-gdebi
@@ -39,4 +39,4 @@ function checkbuilddep_internal () {
$CHROOTEXEC /usr/bin/apt-get install -y "${APTGETOPT[@]}" $INSTALL
}
-. /usr/lib/pbuilder/pbuilder-satisfydepends-checkparams
+. "${BASH_SOURCE%/*}/pbuilder-satisfydepends-checkparams"
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index 3e1a680..ff5a1c4 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -18,7 +18,7 @@
set -e
-. /usr/lib/pbuilder/pbuilder-checkparams
+. "${BASH_SOURCE%/*}/pbuilder-checkparams"
if [ -n "$DISTRIBUTION" ] && [ "$OVERRIDE_APTLINES" = "yes" ]; then
log "I: Upgrading for distribution $DISTRIBUTION"