Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (14 sloc) 412 Bytes
#!/bin/bash
# take a component and a directory as arguments, write to stdout a
# MANIFEST file fragment
if [ -z "${RPM}" ]; then
RPM=/bin/rpm
fi
component=$1
dir=$2
for path in $(/bin/ls -1 $2/*.src.rpm); do
name=$(${RPM} --qf "%{name}" -qp ${path})
license=$(${RPM} --qf "%{License}" -qp ${path})
license=$(echo ${license} | /bin/sed -e 's/\s/_/g')
echo "${component} ${license} file ${path}"
done