Change '-type f' to '-not -type d' to make sure we also get symlinks

and whatnot.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@260 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2003-06-18 11:32:54 +00:00
parent f8982aa271
commit 5c411be234
1 changed files with 2 additions and 2 deletions

View File

@ -1,11 +1,11 @@
#!/bin/sh
#
# $P4: //depot/projects/openpam/clean.sh#1 $
# $P4: //depot/projects/openpam/clean.sh#2 $
tmpfile="/tmp/openpam-clean.$$"
p4 files ... | grep -v 'delete change' |
sed 's|^.*/openpam/||; s|#.*$||' > "${tmpfile}"
find . -type f | cut -c 3- | while read file ; do
find . -not -type d | cut -c 3- | while read file ; do
grep "^${file}\$" "${tmpfile}" >/dev/null || rm -v "${file}"
done
find . -type d -empty -print -delete