[ovs-dev] [PATCH 2/2] dist-docs: Install plaintext files properly.
Ben Pfaff
blp at ovn.org
Tue Feb 9 04:18:35 UTC 2016
We shouldn't try to treat every file as Markdown.
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
build-aux/dist-docs | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/build-aux/dist-docs b/build-aux/dist-docs
index 1aeefa7..93709c8 100755
--- a/build-aux/dist-docs
+++ b/build-aux/dist-docs
@@ -70,23 +70,38 @@ for file
do
title=`head -1 "$srcdir/$file"`
dir=$distdir/`dirname $file`; test -d "$dir" || mkdir "$dir"
- cp "$srcdir/$file" "$distdir/$file.txt"
- (cat <<EOF
+ case $file in
+ *.md)
+ cp "$srcdir/$file" "$distdir/$file.txt"
+ (cat <<EOF
<html><head>
<meta charset="UTF-8"></head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>$file (Open vSwitch $VERSION)</title>
</head><body>
EOF
- markdown "$distdir/$file.txt"
- echo "</body></html>") > "$distdir/$file.html"
- cat <<EOF
+ markdown "$distdir/$file.txt"
+ echo "</body></html>") > "$distdir/$file.html"
+ cat <<EOF
<tr>
<td>$file</td>
<td>$title</td>
<td><a href="$file.html">HTML</a>, <a href="$file.txt">plain text</a></td>
</tr>
EOF
+ ;;
+
+ *)
+ cp "$srcdir/$file" "$distdir/$file"
+ cat <<EOF
+<tr>
+ <td>$file</td>
+ <td>$title</td>
+ <td><a href="$file">plain text</a></td>
+</tr>
+EOF
+ ;;
+ esac
done >&3
# Add header for manpages to index.html.
--
2.1.3
More information about the dev
mailing list