Handle config.guess and config.sub with DOS EOLs
[platform/upstream/rpm.git] / scripts / check-prereqs
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