From 9c8a91342cdfe751932ca0dab99f188fd265e924 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Thu, 27 Apr 2023 20:58:54 +0200 Subject: [PATCH] Fix: Drop counting variations stuff [skip ci] [why] We have no license files in the patched-fonts dir. Sometimes we have no README.md either. [how] Well, fix code for extradeep directory structures. Signed-off-by: Fini Jastrow --- bin/scripts/gotta-patch-em-all-font-patcher!.sh | 2 +- bin/scripts/standardize-and-complete-readmes.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/scripts/gotta-patch-em-all-font-patcher!.sh b/bin/scripts/gotta-patch-em-all-font-patcher!.sh index d2e24be6c..255454a65 100755 --- a/bin/scripts/gotta-patch-em-all-font-patcher!.sh +++ b/bin/scripts/gotta-patch-em-all-font-patcher!.sh @@ -316,7 +316,7 @@ function generate_info { # into the destination. This will overwrite all same-names files # so make sure all licenses of one fontface are identical echo "$LINE_PREFIX * Copying license files" - copy_license "$(find_font_root $config_dir)" "$patched_font_dir" + copy_license "$(find_font_root $current_dir)" "$patched_font_dir" } diff --git a/bin/scripts/standardize-and-complete-readmes.sh b/bin/scripts/standardize-and-complete-readmes.sh index 7ce0d753f..e56eccd24 100755 --- a/bin/scripts/standardize-and-complete-readmes.sh +++ b/bin/scripts/standardize-and-complete-readmes.sh @@ -60,12 +60,11 @@ do continue fi - dirname=$(dirname "$filename") - searchdir=$filename base_directory=$(echo "$filename" | cut -d "/" -f2) + searchdir=$base_directory # limit looking for the readme files in the parent dir not the child dirs: - if [[ $dirname != "." ]]; + if [ "$dirname" != "." -a -n "$dirname" ]; then searchdir=$dirname else