summaryrefslogtreecommitdiff
path: root/build-aux/gnu-web-doc-update
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-01-20 14:10:30 +0000
committerPádraig Brady <P@draigBrady.com>2016-01-20 14:14:13 +0000
commit6465306025facca3881bcea411b757b0fe8e8df8 (patch)
tree790fb63f2f5f445773ce02eb6449c74ab0f76a0a /build-aux/gnu-web-doc-update
parent914feb672c648f6c5025435faafda7788bc26b01 (diff)
downloadgnulib-6465306025facca3881bcea411b757b0fe8e8df8.tar.gz
gnu-web-doc-update: fix addition of new files
If there were already added (emnpty) dirs, then cvs aborts the add with the message: cvs [add aborted]: there is a version in <./dirname> already * build-aux/gnu-web-doc-update: Add directories separately to the addition of files, to avoid the above issue impacting the addition of files.
Diffstat (limited to 'build-aux/gnu-web-doc-update')
-rwxr-xr-xbuild-aux/gnu-web-doc-update11
1 files changed, 6 insertions, 5 deletions
diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update
index ec2116852c..271e693700 100755
--- a/build-aux/gnu-web-doc-update
+++ b/build-aux/gnu-web-doc-update
@@ -179,11 +179,12 @@ $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
cd $tmp/$pkg/manual
# Add all the files. This is simpler than trying to add only the
- # new ones because of new directories: it would require iterating on
- # adding the outer directories, and then their contents.
- #
- # find guarantees that we add outer directories first.
- find . -name CVS -prune -o -print \
+ # new ones because of new directories
+ # First add non empty dirs individually
+ find . -name CVS -prune -o -type d \! -empty -print \
+ | $XARGS -n1 --no-run-if-empty -- $dryrun $CVS add -ko
+ # Now add all files
+ find . -name CVS -prune -o -type f -print \
| $XARGS --no-run-if-empty -- $dryrun $CVS add -ko
# Report/Remove stale files