home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / lib / rpm / check-prereqs < prev    next >
Text File  |  2006-11-29  |  420b  |  18 lines

  1. #!/bin/bash
  2.  
  3. bashit="/bin/bash --rpm-requires"
  4.  
  5. # Make sure that this bash has the rpm-requires hack
  6. $bashit < /dev/null 2>&1 > /dev/null || exit $?
  7.  
  8. prereqs="`cat | $bashit | sort | uniq | sed -e 's/^bash(//' -e 's/)$//'`" -e 's/^executable(//' -e 's/)$//'`"
  9. [ -z "$prereqs" ] && exit 0
  10.  
  11. for prereq in $prereqs
  12. do
  13.     case $prereq in
  14.     /*)    echo $prereq ;;
  15.     *)    echo "`which $prereq`" ;;
  16.     esac
  17. done | sort | uniq
  18.