run-script 397 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. top_srcdir=`dirname $0`
  3. # To avoid using «readlink -f» or «realpath» we just change into the
  4. # desired directory and work from there.
  5. cd "$top_srcdir"
  6. cwd=`pwd`
  7. cd "$OLDPWD"
  8. # Set up the environment, to use local perl modules and data files.
  9. export PERL5LIB=$cwd/scripts:$cwd/dselect/methods
  10. export DPKG_DATADIR=$cwd
  11. interp=$1
  12. script=$2
  13. shift 2
  14. exec $interp "$cwd/$script" "$@"