#!/bin/sh # # Gets file list on standard input and RPM_BUILD_ROOT as first parameter # and searches for omitted files (not counting directories). # Returns it's output on standard output. # # filon@pld.org.pl RPM_BUILD_ROOT=$1 [ ! -d "$RPM_BUILD_ROOT" ] && exit 1 [ "$TMPDIR" ] || TMPDIR=/tmp FILES_DISK=`mktemp $TMPDIR/rpmXXXXXX` FILES_RPM=`mktemp $TMPDIR/rpmXXXXXX` find $RPM_BUILD_ROOT -type f | LC_ALL=C sort > $FILES_DISK LC_ALL=C sort > $FILES_RPM for f in `diff "$FILES_DISK" "$FILES_RPM" | grep "^< " | cut -c3-`; do echo $f | sed -e "s#^$RPM_BUILD_ROOT# #g" done rm -f $FILES_DISK rm -f $FILES_RPM