Dpkg::OpenPGP::Backend::GnuPG: Fallback to use «gpg dearmor» if present
[dpkg.git] / build-aux / run-script
blob1045a7a1f41424954f0c2af6c389fae2e0f83eb1
1 #!/bin/sh
3 set -e
5 top_srcdir="$(dirname "$0")/.."
7 # To avoid using «readlink -f» or «realpath» we just change into the
8 # desired directory and work from there.
9 cd "$top_srcdir"
10 cwd="$(pwd)"
11 cd "$OLDPWD"
13 # Set up the environment, to use local perl modules and data files.
14 export PERL="${PERL:-perl}"
15 export PERL5LIB="$cwd/scripts:$cwd/dselect/methods"
16 export DPKG_DATADIR="$cwd/data"
18 script="$1"
19 shift 1
21 exec "$PERL" "$cwd/$script" "$@"