fixed bug in localizefonts.sh

This commit is contained in:
PrivacyDev 2022-12-12 19:15:44 -05:00
parent ef0dbb91ba
commit 585605312f

View File

@ -3,8 +3,8 @@
base='https://fonts\.(gstatic\.com|kavin\.rocks)'
fonts=$(cat dist/assets/* | grep -Po "$base[^)]*" | sort | uniq)
for font in $fonts; do
file="dist/fonts$(echo $font | sed "s#$base##")"
file="dist/fonts$(echo $font | sed -E "s#$base##")"
mkdir -p "$(dirname "$file")"
curl -L "$font" -o "$file"
done
sed -i "s#$base#/fonts#g" dist/assets/*
sed -Ei "s#$base#/fonts#g" dist/assets/*