mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-31 12:27:22 +02:00
Updates to be runnable everywhere and remove archives before run
This commit is contained in:
parent
84595a202e
commit
d1143347e0
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Nerd Fonts Version: 2.0.0
|
||||
# Script Version: 1.0.0
|
||||
# Script Version: 1.1.0
|
||||
# Iterates over all patched fonts directories
|
||||
# to generate ruby cask files for homebrew-fonts (https://github.com/caskroom/homebrew-fonts)
|
||||
# adds Windows versions of the fonts as well (casks files just won't download them)
|
||||
@ -8,8 +8,11 @@
|
||||
#set -x
|
||||
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
scripts_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/"
|
||||
echo "dir $scripts_root_dir"
|
||||
outputdir=$scripts_root_dir/../../archives/
|
||||
|
||||
cd ../../patched-fonts/ || {
|
||||
cd "$scripts_root_dir/../../patched-fonts/" || {
|
||||
echo >&2 "$LINE_PREFIX Could not find patched fonts directory"
|
||||
exit 1
|
||||
}
|
||||
@ -24,6 +27,9 @@ else
|
||||
echo "$LINE_PREFIX No limting pattern given, will search entire folder"
|
||||
fi
|
||||
|
||||
# clear out the directory zips
|
||||
find "${outputdir:?}" -name "*.zip" -type f -delete
|
||||
|
||||
#find ./Hack -maxdepth 0 -type d | # uncomment to test 1 font
|
||||
#find ./ProFont -maxdepth 0 -type d | # uncomment to test 1 font
|
||||
find $pattern -maxdepth 1 -type d | # uncomment to test all fonts
|
||||
@ -32,7 +38,6 @@ do
|
||||
|
||||
basename=$(basename "$filename")
|
||||
searchdir=$filename
|
||||
outputdir=$PWD/../archives/
|
||||
|
||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user