2016-11-13 19:25:35 +02:00
|
|
|
#!/bin/bash
|
2016-12-15 03:22:26 +02:00
|
|
|
# version: 1.0.0
|
2016-11-13 19:25:35 +02:00
|
|
|
# Iterates over all patched fonts directories
|
|
|
|
# to generate ruby cask files for homebrew-fonts (https://github.com/caskroom/homebrew-fonts)
|
2016-12-03 06:03:07 +02:00
|
|
|
# adds Windows versions of the fonts as well (casks files just won't download them)
|
2016-11-13 19:25:35 +02:00
|
|
|
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
cd ../../patched-fonts/ || {
|
|
|
|
echo >&2 "# Could not find patched fonts directory"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
#find ./Hack -maxdepth 0 -type d | # uncomment to test 1 font
|
2016-11-19 03:27:38 +02:00
|
|
|
#find ./ProFont -maxdepth 0 -type d | # uncomment to test 1 font
|
|
|
|
find . -maxdepth 1 -type d | # uncomment to test all fonts
|
2016-11-13 19:25:35 +02:00
|
|
|
while read -r filename
|
|
|
|
do
|
|
|
|
|
|
|
|
basename=$(basename "$filename")
|
|
|
|
searchdir=$filename
|
|
|
|
outputdir=$PWD/../archives/
|
|
|
|
|
|
|
|
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
|
|
|
|
2016-12-03 06:03:07 +02:00
|
|
|
zip "$outputdir/$basename" -rj "$searchdir" -i '*.[o,t]tf'
|
2016-11-13 19:25:35 +02:00
|
|
|
|
|
|
|
done
|