From 516ec882f92587ef19f8e4cb7bea6a5b72b2805d Mon Sep 17 00:00:00 2001 From: Slimane MEHARZI <59923212+SlyPex@users.noreply.github.com> Date: Mon, 5 Aug 2024 09:59:43 +0100 Subject: [PATCH] Updated README file checker script --- .github/scripts/readme_file_checker.sh | 3 +-- .gitlab/scripts/readme_file_checker.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/scripts/readme_file_checker.sh b/.github/scripts/readme_file_checker.sh index 0654089..4ff1695 100755 --- a/.github/scripts/readme_file_checker.sh +++ b/.github/scripts/readme_file_checker.sh @@ -15,8 +15,7 @@ else COUNTER=0 mapfile -t CHALLS_UNDER_DIR < <(echo $(ls "$1" | sort)) - mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | sort )) - + mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | grep -Po "(?<=\[).+(?=\])" | sort )) for dir_chall in "${CHALLS_UNDER_DIR[@]}" do diff --git a/.gitlab/scripts/readme_file_checker.sh b/.gitlab/scripts/readme_file_checker.sh index 0654089..8b309e3 100755 --- a/.gitlab/scripts/readme_file_checker.sh +++ b/.gitlab/scripts/readme_file_checker.sh @@ -15,7 +15,7 @@ else COUNTER=0 mapfile -t CHALLS_UNDER_DIR < <(echo $(ls "$1" | sort)) - mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | sort )) + mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | grep -Po "(?<=\[).+(?=\])" | sort )) for dir_chall in "${CHALLS_UNDER_DIR[@]}"