summaryrefslogtreecommitdiff
path: root/dh_lib
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:42:10 +0000
committerjoey <joey>1999-08-17 04:42:10 +0000
commit151fcdd2c72ee77597124c74450d66ba2840b14b (patch)
treeff78dd56038a3c6632ab307bafbf83e9c928693a /dh_lib
parent94f1df06050aa3c512fd8af6e67690f482fbcd5a (diff)
downloaddebhelper-151fcdd2c72ee77597124c74450d66ba2840b14b.tar.gz
r47: Initial Import
Diffstat (limited to 'dh_lib')
-rw-r--r--dh_lib16
1 files changed, 15 insertions, 1 deletions
diff --git a/dh_lib b/dh_lib
index 39dae2a5..06a4666b 100644
--- a/dh_lib
+++ b/dh_lib
@@ -44,11 +44,25 @@ tmpdir() {
fi
}
+# Pass this the name of a binary package, and the name of the file wanted
+# for the package, and it will return the actual filename to use. For
+# example if the package is foo, and the file is somefile, it will look for
+# debian/somefile, and if found return that, otherwise, it will look for
+# debian/foo, and if found, return that. Failing that, it will return
+# nothing.
+pkgfile() {
+ if [ -e "debian/$1.$2" ]; then
+ echo "debian/$1.$2"
+ elif [ "$1" = "$MAINPACKAGE" -a -e "debian/$2" ]; then
+ echo "debian/$2"
+ fi
+}
+
# Pass it a name of a binary package, it returns the name to prefix to files
# in debian for this package.
pkgext() {
if [ "$1" != "$MAINPACKAGE" ]; then
- echo "$PACKAGE."
+ echo "$PACKAGE."
fi
}