From 529532d897f8a3af890b42e27c2e24037da7a8f4 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Thu, 27 Apr 2023 08:04:24 +0200 Subject: [PATCH] standardize: Retab with ts=2 [why] The file is a mix auf indentation via two blanks and single tabs. Tabs usually render as 8 positions. Also it is strange to not-stick to one indent style. [how] : :set ts=2 :set et :retab :wq Signed-off-by: Fini Jastrow --- .../standardize-and-complete-readmes.sh | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/bin/scripts/standardize-and-complete-readmes.sh b/bin/scripts/standardize-and-complete-readmes.sh index ed934ddc9..2a24549e6 100755 --- a/bin/scripts/standardize-and-complete-readmes.sh +++ b/bin/scripts/standardize-and-complete-readmes.sh @@ -60,14 +60,14 @@ do continue fi - dirname=$(dirname "$filename") - searchdir=$filename + dirname=$(dirname "$filename") + searchdir=$filename base_directory=$(echo "$filename" | cut -d "/" -f2) - # limit looking for the readme files in the parent dir not the child dirs: - if [[ $dirname != "." ]]; - then - searchdir=$dirname + # limit looking for the readme files in the parent dir not the child dirs: + if [[ $dirname != "." ]]; + then + searchdir=$dirname else # reset the variables unset config_rfn @@ -84,70 +84,70 @@ do unset config_rfn_substitue fi fi - fi + fi - mapfile -t RST < <(find "$searchdir" -type f -iname 'readme.rst') - mapfile -t TXT < <(find "$searchdir" -type f -iname 'readme.txt') - mapfile -t MD < <(find "$searchdir" -type f -iname 'readme.md') - outputdir=$PWD/../../patched-fonts/$filename/ + mapfile -t RST < <(find "$searchdir" -type f -iname 'readme.rst') + mapfile -t TXT < <(find "$searchdir" -type f -iname 'readme.txt') + mapfile -t MD < <(find "$searchdir" -type f -iname 'readme.md') + outputdir=$PWD/../../patched-fonts/$filename/ - echo "$LINE_PREFIX Generating readme for: $filename" + echo "$LINE_PREFIX Generating readme for: $filename" - [[ -d "$outputdir" ]] || mkdir -p "$outputdir" + [[ -d "$outputdir" ]] || mkdir -p "$outputdir" - if [ "${RST[0]}" ]; - then - for i in "${RST[@]}" - do - echo "$LINE_PREFIX Found RST" + if [ "${RST[0]}" ]; + then + for i in "${RST[@]}" + do + echo "$LINE_PREFIX Found RST" - from="$PWD/$i" - to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" - to="${to_dir}/$infofilename" + from="$PWD/$i" + to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" + to="${to_dir}/$infofilename" clearDestination "$to_dir" "$to" - pandoc "$from" --from=rst --to=markdown --output="$to" + pandoc "$from" --from=rst --to=markdown --output="$to" appendRfnInfo "$config_rfn" "$config_rfn_substitue" "$PWD" "$to" cat "$PWD/../../src/readme-per-directory-addendum.md" >> "$to" - done - elif [ "${TXT[0]}" ]; - then - for i in "${TXT[@]}" - do - echo "$LINE_PREFIX Found TXT" + done + elif [ "${TXT[0]}" ]; + then + for i in "${TXT[@]}" + do + echo "$LINE_PREFIX Found TXT" - from="$PWD/$i" - to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" - to="${to_dir}/$infofilename" + from="$PWD/$i" + to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" + to="${to_dir}/$infofilename" clearDestination "$to_dir" "$to" - cp "$from" "$to" + cp "$from" "$to" appendRfnInfo "$config_rfn" "$config_rfn_substitue" "$PWD" "$to" cat "$PWD/../../src/readme-per-directory-addendum.md" >> "$to" - done - elif [ "${MD[0]}" ]; - then - for i in "${MD[@]}" - do - echo "$LINE_PREFIX Found MD" + done + elif [ "${MD[0]}" ]; + then + for i in "${MD[@]}" + do + echo "$LINE_PREFIX Found MD" - from="$PWD/$i" - to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" - to="${to_dir}/$infofilename" + from="$PWD/$i" + to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" + to="${to_dir}/$infofilename" clearDestination "$to_dir" "$to" - cp "$from" "$to" + cp "$from" "$to" appendRfnInfo "$config_rfn" "$config_rfn_substitue" "$PWD" "$to" cat "$PWD/../../src/readme-per-directory-addendum.md" >> "$to" - done - else + done + else echo "$LINE_PREFIX Did not find any readme files (RST,TXT,MD) generating just title of Font" to_dir="${PWD/$unpatched_parent_dir/$patched_parent_dir}/$filename" @@ -161,6 +161,6 @@ do appendRfnInfo "$config_rfn" "$config_rfn_substitue" "$PWD" "$to" cat "$PWD/../../src/readme-per-directory-addendum.md" >> "$to" - fi + fi done