#!/bin/sh -ef atexit() { local rc=$? trap - EXIT rm -f "$tmpfile" exit $rc } tmpfile=`mktemp -t fpc2prov.XXXXXXXX` trap atexit EXIT HUP INT QUIT PIPE TERM cat >"$tmpfile" : ${PPUDUMP:=ppudump} while read -r file; do [ -n "$file" -a -z "${file##*.ppu}" ] || continue $PPUDUMP -vh "$file" |awk -v ppu="$(basename "$file" .ppu)" \ '/^Interface Checksum/{printf "fpc2(%s) = %s\n", tolower(ppu), $NF}' done <"$tmpfile" /usr/lib/rpm/find-provides ${1+"$@"} <"$tmpfile"