Skip to content

Commit d041249

Browse files
committed
Added a pascal case variant of the vendor name variable
1 parent 9012b5c commit d041249

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

configure-skeleton.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ package_description=$(ask_question "Package description" "$package_name")
4242
# convert my-class-title to MyClassTitle - RODO: use to subsctitute ./src/*
4343
class_name=$(echo "$package_name" | sed 's/[-_]/ /g' | awk '{for(j=1;j<=NF;j++){ $j=toupper(substr($j,1,1)) substr($j,2) }}1' | sed 's/[[:space:]]//g')
4444

45+
vendor_name_pascal_case=`echo "$vendor_name_unsanitized" | sed -r 's/(^|-)(\w)/\U\2/g'`
4546
vendor_name_lower_case=`echo "$vendor_name_unsantized" | tr '[:upper:]' '[:lower:]'`
4647
vendor_name="$(tr '[:lower:]' '[:upper:]' <<< ${vendor_name_lower_case:0:1})${vendor_name_lower_case:1}"
4748

@@ -67,7 +68,7 @@ for file in $files ; do
6768
| sed "s/:author_email/$author_email/g" \
6869
| sed "s/:author_homepage/$author_homepage/g" \
6970
| sed "s/:package_name/$package_name/g" \
70-
| sed "s/Spatie/$vendor_name/g" \
71+
| sed "s/Spatie/$vendor_name_pascal_case/g" \
7172
| sed "s/Skeleton/$class_name/g" \
7273
| sed "s/:vendor_name/$vendor_name_lower_case/g" \
7374
| sed "s/:package_description/$package_description/g" \

0 commit comments

Comments
 (0)