From: Bruno Haible Date: Sun, 20 Apr 2008 06:11:01 +0000 (+0000) Subject: Add a paranoic check. X-Git-Tag: v0.18~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd3b4987eae22d0b245438c0bcf05e92b3badc7;p=thirdparty%2Fgettext.git Add a paranoic check. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 10d5a91f3..4442c044d 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,8 @@ +2008-04-20 Bruno Haible + + * autopoint.in: Check that really all CVS directories are removed. + Reported by Jim Meyering . + 2008-01-18 Bruno Haible * autopoint.in (xver): Make its computation more robust. diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index 4bcaabc2d..9e71a71d7 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -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"