rpmx.sh 752 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. ##
  3. ## rpmx.sh -- RPM eXtension (Shell Wrapper)
  4. ## Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. # root directory of RPM hierarchy
  7. root="@l_prefix@"
  8. # search for Perl interpreter
  9. perl=""
  10. for d in `IFS=:; echo $root/bin:$PATH`; do
  11. if [ -f "$d/perl" ]; then
  12. perl="$d/perl"
  13. break
  14. fi
  15. done
  16. # we can only operate if Perl is available
  17. if [ ".$perl" = . ]; then
  18. echo "rpm: This functionality requires the Perl interpreter." 1>&2
  19. echo "rpm: Either place a vendor-supplied Perl interpreter into your" 1>&2
  20. echo "rpm: \$PATH or install the OpenPKG \"perl\" package, first." 1>&2
  21. exit 1
  22. fi
  23. # transfer control to the real program
  24. exec $perl $root/lib/openpkg/rpmx.pl $root ${1+"$@"}