summaryrefslogtreecommitdiff
path: root/run-script
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2012-06-06 04:38:49 +0200
committerGuillem Jover <guillem@debian.org>2012-06-06 12:06:20 +0200
commit0aee0c37364b7160213d87ca76b0e3b56173370f (patch)
treea3c56c44891bd377b579b2b94a6fa1b1b411c50e /run-script
parent18f0cefb38eb362116d16ed89b712c4d7a054414 (diff)
downloaddpkg-0aee0c37364b7160213d87ca76b0e3b56173370f.tar.gz
build: Add new run-script to run local scripts
This sets up the environment to be able to run the local scripts using local modules and data files.
Diffstat (limited to 'run-script')
-rwxr-xr-xrun-script13
1 files changed, 13 insertions, 0 deletions
diff --git a/run-script b/run-script
new file mode 100755
index 000000000..d70af9c6d
--- /dev/null
+++ b/run-script
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+top_srcdir=`dirname $0`
+
+# To avoid using «readlink -f» or «realpath» we just change into the
+# desired directory and work from there.
+cd "$top_srcdir"
+
+# Set up the environment, to use local perl modules and data files.
+export PERL5LIB=`pwd`/scripts
+export DPKG_DATADIR=`pwd`
+
+exec "$@"