mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-03-03 14:36:18 +02:00
Homebrew Fonts Cask script improvements (#72)
* fixes cask names generated as the same for mono and non-mono cask files
This commit is contained in:
parent
e9d84b6c02
commit
ece4978fc3
@ -27,6 +27,7 @@ function clear_file {
|
|||||||
|
|
||||||
function write_header {
|
function write_header {
|
||||||
local outputfile=$1
|
local outputfile=$1
|
||||||
|
local caskname=$2
|
||||||
|
|
||||||
{
|
{
|
||||||
printf "cask '%s' do\n" "$caskname"
|
printf "cask '%s' do\n" "$caskname"
|
||||||
@ -77,9 +78,9 @@ function write_footer {
|
|||||||
} >> "$outputfile"
|
} >> "$outputfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
find ./Hack -maxdepth 0 -type d | # uncomment to test 1 font
|
#find ./Hack -maxdepth 0 -type d | # uncomment to test 1 font
|
||||||
#find ./ProFont -maxdepth 2 -type d | # uncomment to test 1 font
|
#find ./ProFont -maxdepth 2 -type d | # uncomment to test 1 font
|
||||||
#find . -maxdepth 1 -type d | # uncomment to test 1 font
|
find . -maxdepth 1 -type d | # uncomment to test 1 font
|
||||||
while read -r filename
|
while read -r filename
|
||||||
do
|
do
|
||||||
|
|
||||||
@ -113,10 +114,10 @@ do
|
|||||||
to_mono="$outputdir/${caskname_mono}.rb"
|
to_mono="$outputdir/${caskname_mono}.rb"
|
||||||
|
|
||||||
clear_file "$to"
|
clear_file "$to"
|
||||||
write_header "$to"
|
write_header "$to" "$caskname"
|
||||||
|
|
||||||
clear_file "$to_mono"
|
clear_file "$to_mono"
|
||||||
write_header "$to_mono"
|
write_header "$to_mono" "$caskname_mono"
|
||||||
|
|
||||||
write_body "$to" "${FONTS[@]}"
|
write_body "$to" "${FONTS[@]}"
|
||||||
write_body "$to_mono" "${MONOFONTS[@]}"
|
write_body "$to_mono" "${MONOFONTS[@]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user