gettext/gettext-0.17-autopoint-CVS-441481.patch
Jens Petersen 8aec675b91 fix autopoint messing up CVS files (#441481)
- reported by Richard W.M. Jones
- patch by Jim Meyering and Bruno Haible
2008-04-24 05:29:42 +00:00

25 lines
969 B
Diff

2008-04-20 Bruno Haible <bruno@clisp.org>
* autopoint.in: Check that really all CVS directories are removed.
Reported by Jim Meyering <jim@meyering.net>.
*** gettext-tools/misc/autopoint.in 18 Jan 2008 23:30:16 -0000 1.37
--- gettext-tools/misc/autopoint.in 20 Apr 2008 06:06:07 -0000
***************
*** 426,431 ****
--- 426,438 ----
cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
(cvs checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
find archive -name CVS -type d -print | xargs rm -rf
+ # Check that really all CVS directories are gone, otherwise we would overwrite
+ # the contents of the user's CVS directories.
+ if test `find archive -name CVS -type d -print | wc -l` != 0; then
+ cd ..
+ rm -rf "$cvs_dir" "$work_dir"
+ func_fatal_error "failed to remove all CVS subdirectories"
+ fi
if test `find archive -type f -print | wc -l` = 0; then
cd ..
rm -rf "$cvs_dir" "$work_dir"