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