utt/dist/common/find_rpm_deps.sh

17 lines
337 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# sprawdzamy czy podano argument
if test $# -lt 1; then echo RPM file name expected!; exit -1; fi
# sprawdzamy czy to plik, potem, czy rpm
if test -f $1; \
then
if test "rpm" = `ls $1 | tail -c 4`; \
then
rpm -q -R -p $1; \
else echo "It's not a RPM file!"; \
fi
else echo RPM file not found!; \
fi