]>
Commit | Line | Data |
---|---|---|
08e95360 MT |
1 | #!/bin/bash |
2 | ||
3 | if [ -z "${1}" ]; then | |
4 | echo >&2 "No input file passed!" | |
5 | exit 1 | |
6 | fi | |
7 | ||
8 | prereqs=$(bash --rpm-requires < ${1} | sort | uniq | sed -e 's/^bash(//' -e 's/)$//' -e 's/^executable(//' -e 's/)$//') | |
9 | [ -z "${prereqs}" ] && exit 0 | |
10 | ||
11 | for prereq in ${prereqs}; do | |
12 | case "${prereq}" in | |
13 | /*) | |
14 | echo ${prereq} | |
15 | ;; | |
16 | *) | |
17 | which ${prereq} 2>/dev/null | |
18 | ;; | |
19 | esac | |
20 | done | sort | uniq |