]> git.codecow.com Git - Monocypher.git/commitdiff
Match man2html.sh style
authorMichael Savage <mikejsavage@gmail.com>
Sat, 28 Dec 2019 23:51:33 +0000 (01:51 +0200)
committerMichael Savage <mikejsavage@gmail.com>
Sat, 28 Dec 2019 23:51:33 +0000 (01:51 +0200)
doc/extract_examples.sh

index bda04d02cdd88329ba31d955e7944e83fd506916..64bb940b70738f59233aeb2f70bc490e07ff958a 100755 (executable)
@@ -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 "}"