]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add a paranoic check.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Apr 2008 06:11:01 +0000 (06:11 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:39 +0000 (12:15 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/autopoint.in

index 10d5a91f3dc5ddf687c8d214245bebf1a80cdddb..4442c044d04bd1fe71c0748213a9cb594c63a117 100644 (file)
@@ -1,3 +1,8 @@
+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>.
+
 2008-01-18  Bruno Haible  <bruno@clisp.org>
 
        * autopoint.in (xver): Make its computation more robust.
index 4bcaabc2d078c1ef64b97004dd00230d3cec419f..9e71a71d788435ea52465cccf3ee46edc571404e 100644 (file)
@@ -426,6 +426,13 @@ cd "$work_dir"
 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"