From cbf1bfbd12f805604e227218ff6d3ba99f5e9619 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Wed, 20 Apr 2022 02:10:17 +0200 Subject: [PATCH] Use uppercase for bash variables --- docs/update_docs.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/update_docs.sh b/docs/update_docs.sh index 445b00c..8ab90a3 100644 --- a/docs/update_docs.sh +++ b/docs/update_docs.sh @@ -5,19 +5,19 @@ # You have to cd into the docs directory where this script is located before running it! # List of documentation files -doc_file_names=$(fd -d 1 -t f --extension adoc --exclude "README.adoc") +DOC_FILE_NAMES=$(fd -d 1 -t f --extension adoc --exclude "README.adoc") -for doc_file_name in "${doc_file_names[@]}"; do - doc_file_name_without_extension=${doc_file_name::-5} - output_path=../advlabdb/templates/docs/$doc_file_name_without_extension.html +for doc_file_name in "${DOC_FILE_NAMES[@]}"; do + DOC_FILE_NAME_WITHOUT_EXTENSION=${doc_file_name::-5} + OUTPUT_PATH=../advlabdb/templates/docs/$DOC_FILE_NAME_WITHOUT_EXTENSION.html # Convert to html with asciidoctor - asciidoctor -v --backend html5 "$doc_file_name" -o "$output_path" + asciidoctor -v --backend html5 "$doc_file_name" -o "$OUTPUT_PATH" # Add the Jinja raw tag - sed -i "1i {% raw %}" "$output_path" - echo -e "\n{% endraw %}" >>"$output_path" + sed -i "1i {% raw %}" "$OUTPUT_PATH" + echo -e "\n{% endraw %}" >>"$OUTPUT_PATH" # Done - echo "Generated $output_path" + echo "Generated $OUTPUT_PATH" done