Skip to content

Commit

Permalink
Clear asciidoc-helper.sh syntax
Browse files Browse the repository at this point in the history
Remove all unnecessary ";" characters at the end of several lines.
Align all indentations to 4 spaces.
Update console messages related to XML_CATALOG_FILES and
.bashrc file.

Signed-off-by: skaluzka <[email protected]>
  • Loading branch information
skaluzka committed Sep 8, 2021
1 parent 82168e5 commit eac7bdc
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions doc/asciidoc-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -e

if [ $# != 3 ]; then
exit 1;
exit 1
fi

output=$3
Expand All @@ -19,50 +19,49 @@ if [ "$1" = "html" ]; then
base=${output%%.html.in}

if [ "$2" != none ]; then
TZ=UTC "$2" -d manpage -o "$output" "$input";
TZ=UTC "$2" -d manpage -o "$output" "$input"
else
echo "==================================";
echo;
echo "You need asciidoc installed to be able to build the manpage.";
echo "To build without manpages, use the --disable-asciidoc argument";
echo "when calling configure.";
echo;
echo "==================================";
exit 1;
echo "=================================="
echo
echo "You need asciidoc installed to be able to build the manpage."
echo "To build without manpages, use the --disable-asciidoc argument"
echo "when calling configure."
echo
echo "=================================="
exit 1
fi
elif [ "$1" = "man" ]; then
input=${output%%.1.in}.1.txt
base=${output%%.1.in}

if test "$2" = none; then
echo "==================================";
echo;
echo "You need asciidoc installed to be able to build the manpage.";
echo "To build without manpages, use the --disable-asciidoc argument";
echo "when calling configure.";
echo;
echo "==================================";
exit 1;
echo "=================================="
echo
echo "You need asciidoc installed to be able to build the manpage."
echo "To build without manpages, use the --disable-asciidoc argument"
echo "when calling configure."
echo
echo "=================================="
exit 1
fi
if "$2" -f manpage "$input"; then
mv "$base.1" "$output";
mv "$base.1" "$output"
else
cat<<EOF
cat<<EOF
==================================
You need a working asciidoc installed to be able to build the manpage.
a2x is installed, but for some reason it isn't working. Sometimes
this happens because required docbook support files are missing.
Please install docbook-xsl, docbook-xml, and xmlto (Debian) or
similar. If you use homebrew on Mac OS X, install the docbook formula
similar. If you use homebrew on Mac OS X, install the docbook formula
and add "export XML_CATALOG_FILES=/usr/local/etc/xml/catalog" to your
.bashrc
.bashrc file.
Alternatively, to build without manpages, use the --disable-asciidoc
argument when calling configure.
==================================
EOF
exit 1;
exit 1
fi
fi

0 comments on commit eac7bdc

Please sign in to comment.