From 1173834629f6b7a2125995cdcc4bc67612a4a129 Mon Sep 17 00:00:00 2001 From: Michael Savage Date: Sun, 29 Dec 2019 01:51:33 +0200 Subject: [PATCH] Match man2html.sh style --- doc/extract_examples.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/extract_examples.sh b/doc/extract_examples.sh index bda04d0..64bb940 100755 --- a/doc/extract_examples.sh +++ b/doc/extract_examples.sh @@ -66,13 +66,15 @@ void arc4random_buf(void*, size_t); int main() { END -for f in man/man3/*.3monocypher man/man3/optional/*.3monocypher; do - # crypto_sign_init_first_pass_custom_hash examples are more complicated - # and can't be tested like this - if [ ! -h "$f" ] && [ "$f" != "man/man3/crypto_sign_init_first_pass_custom_hash.3monocypher" ]; then - echo "// $f" - cat "$f" | sed -n "/^\.Bd/,/^\.Ed/p" | sed "s/\.Bd.*/{/" | sed "s/\.Ed/}/" - fi +for f in man/man3/*.3monocypher man/man3/optional/*.3monocypher +do + # crypto_sign_init_first_pass_custom_hash examples are more complicated + # and can't be tested like this + if [ ! -h "$f" ] && [ "$f" != "man/man3/crypto_sign_init_first_pass_custom_hash.3monocypher" ] + then + echo "// $f" + cat "$f" | sed -n "/^\.Bd/,/^\.Ed/p" | sed "s/\.Bd.*/{/" | sed "s/\.Ed/}/" + fi done echo "}" -- 2.47.3