csomh / source-git / rpm

Forked from source-git/rpm 4 years ago
Clone
2ff057
#!/bin/bash
2ff057
2ff057
bashit="/bin/bash --rpm-requires"
2ff057
2ff057
# Make sure that this bash has the rpm-requires hack
2ff057
$bashit < /dev/null 2>&1 > /dev/null || exit $?
2ff057
2ff057
prereqs="`cat | $bashit | sort | uniq | sed -e 's/^bash(//' -e 's/)$//' -e 's/^executable(//' -e 's/)$//'`"
2ff057
[ -z "$prereqs" ] && exit 0
2ff057
2ff057
for prereq in $prereqs
2ff057
do
2ff057
    case $prereq in
2ff057
    /*)	echo $prereq ;;
2ff057
    *)	echo "`which $prereq`" ;;
2ff057
    esac
2ff057
done | sort | uniq