A script for removing files P4 doesn't know about.

git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@257 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2003-06-13 10:23:28 +00:00
parent 8ef4fd3218
commit ff7d10eaa1
1 changed files with 13 additions and 0 deletions

13
clean.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# $P4: //depot/projects/openpam/clean.sh#1 $
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
grep "^${file}\$" "${tmpfile}" >/dev/null || rm -v "${file}"
done
find . -type d -empty -print -delete
rm "${tmpfile}"