mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-09 17:58:21 +00:00
fixed bug in localizefonts.sh
This commit is contained in:
parent
ef0dbb91ba
commit
585605312f
@ -3,8 +3,8 @@
|
|||||||
base='https://fonts\.(gstatic\.com|kavin\.rocks)'
|
base='https://fonts\.(gstatic\.com|kavin\.rocks)'
|
||||||
fonts=$(cat dist/assets/* | grep -Po "$base[^)]*" | sort | uniq)
|
fonts=$(cat dist/assets/* | grep -Po "$base[^)]*" | sort | uniq)
|
||||||
for font in $fonts; do
|
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")"
|
mkdir -p "$(dirname "$file")"
|
||||||
curl -L "$font" -o "$file"
|
curl -L "$font" -o "$file"
|
||||||
done
|
done
|
||||||
sed -i "s#$base#/fonts#g" dist/assets/*
|
sed -Ei "s#$base#/fonts#g" dist/assets/*
|
||||||
|
Loading…
Reference in New Issue
Block a user