skip duplicate util-vserver dir
[util-vserver.git] / update-doc
diff --git a/update-doc b/update-doc
new file mode 100755 (executable)
index 0000000..2c49277
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+test -n "$1" || {
+    echo "No target directory given; aborting...">&2
+    exit 1
+}
+
+test -d "$1"/CVS || {
+    echo "Target directory does not seem to be CVS managed; aborting..." >&2
+    exit 1
+}
+
+tmp=$(mktemp -d /tmp/uv.XXXXXX)/doc || exit 1
+trap "rm -rf $tmp" EXIT
+
+mkdir -p "$tmp"/{apidoc/html,conf}
+install -p -m644 doc/*.css doc/*.html             "$tmp"/conf/
+install -p -m644 lib/apidoc/latex/refman.pdf      "$tmp"/apidoc/refman.pdf
+install -p -m644 lib/apidoc/html/*.{css,html,png} "$tmp"/apidoc/html/
+
+rsync -av --delete --exclude=lt2004 --exclude=virtual-servers.pdf --exclude=css \
+      --exclude=img --exclude=CVS --exclude=.symlinks --exclude=.htaccess "$tmp"/ "$1"/