save_IFS=$IFS
IFS=:
for dir in $PATH; do
- IFS=$save_IFS
- if test -x "$dir/$1"; then
- return 0
- fi
+ IFS=$save_IFS
+ if test -x "$dir/$1"; then
+ return 0
+ fi
done
IFS=$save_IFS
echo >&2 "$0: $1 not found in \$PATH, please install and try again"
mkdir $distdir
# Install manpages.
-make install-man mandir="$abs_distdir"/man
+${MAKE-make} install-man mandir="$abs_distdir"/man
(cd $distdir && mv `find man -type f` . && rm -rf man)
manpages=`cd $distdir && echo *`
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"
+ ln -s $(basename "$file.txt") "$distdir/$file"
+ (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.
(cd $distdir
for manpage in $manpages; do
man -l -Tps $manpage | ps2pdf - > $manpage.pdf
- man -l -Tutf8 $manpage | sed 's/.\b//g' > $manpage.txt
+ GROFF_NO_SGR=1 man -l -Tutf8 $manpage | sed 's/.\b//g' > $manpage.txt
(echo '<html><head><meta charset="UTF-8"></head><body><pre>'
- man -l -Tutf8 $manpage | sed '
+ GROFF_NO_SGR=1 man -l -Tutf8 $manpage | sed '
s/&/&/g
s/</</g
s/>/>/g