Navigation Menu

Skip to content

Commit

Permalink
Use "while read" instead of "find -exec"
Browse files Browse the repository at this point in the history
Because dash doesn't have "export -f".
  • Loading branch information
kou committed Jun 8, 2013
1 parent 4a20ae5 commit 04d0ce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/yum/sign-rpm.sh
Expand Up @@ -23,14 +23,14 @@ run()

get_unsigned_rpm()
{
files=$(rpm --checksig $1 | grep -v 'gpg OK' | cut -d":" -f1)
echo $files
while read rpm; do
rpm --checksig "$rpm" | grep -v 'gpg OK' | cut -d":" -f1
done
}
export -f get_unsigned_rpm

rpms=""
for distribution in ${DISTRIBUTIONS}; do
rpms="${rpms} $(find ${DESTINATION}${distribution} -name '*.rpm' -exec sh -c 'get_unsigned_rpm {}' \;)"
rpms="${rpms} $(find ${DESTINATION}${distribution} -name '*.rpm' | get_unsigned_rpm)"
done

echo "NOTE: YOU JUST ENTER! YOU DON'T NEED TO INPUT PASSWORD!"
Expand Down

0 comments on commit 04d0ce9

Please sign in to comment.