summaryrefslogtreecommitdiffstats
path: root/src/zstd/contrib/gen_html/gen-zstd-manual.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/zstd/contrib/gen_html/gen-zstd-manual.sh')
-rwxr-xr-xsrc/zstd/contrib/gen_html/gen-zstd-manual.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/zstd/contrib/gen_html/gen-zstd-manual.sh b/src/zstd/contrib/gen_html/gen-zstd-manual.sh
new file mode 100755
index 00000000..57a8b6ea
--- /dev/null
+++ b/src/zstd/contrib/gen_html/gen-zstd-manual.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+LIBVER_MAJOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h`
+LIBVER_MINOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h`
+LIBVER_PATCH_SCRIPT=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h`
+LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT
+
+echo ZSTD_VERSION=$LIBVER_SCRIPT
+./gen_html $LIBVER_SCRIPT ../../lib/zstd.h ./zstd_manual.html