From 711381e814401d7b5348de70ba94b2b0a586f003 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Wed, 26 Jun 2024 10:13:31 -0700 Subject: [PATCH] ci: another approach --- scripts/check_rule.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/check_rule.sh b/scripts/check_rule.sh index 7fcbd01..ab5848b 100755 --- a/scripts/check_rule.sh +++ b/scripts/check_rule.sh @@ -11,10 +11,11 @@ failed_tests=0 get_last_directory_name() { dir_path=$1 base_name=$(basename "$dir_path") - capitalized_name="$(echo "${base_name:0:1}" | tr '[:lower:]' '[:upper:]')${base_name:1}" + first_char=$(echo "$base_name" | cut -c1 | tr '[:lower:]' '[:upper:]') + rest_chars=$(echo "$base_name" | cut -c2-) + capitalized_name="${first_char}${rest_chars}" echo "$capitalized_name" } - # This function extracts the first folder name (package name) from a given path. get_package_name() { dir_path=$1