1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-12 21:30:27 +05:30
Piped/localizefonts.sh

12 lines
312 B
Bash
Raw Normal View History

2022-12-17 19:17:30 +05:30
#!/bin/sh
base='https://fonts\.(gstatic\.com|kavin\.rocks)'
2023-09-14 11:13:19 +05:30
fonts=$(cat dist/assets/* | grep -Eo "${base}[^)]*" | sort | uniq)
for font in $fonts; do
file="dist/fonts$(echo "$font" | sed -E "s#$base##")"
mkdir -p "$(dirname "$file")"
curl -L "$font" -o "$file"
done
2022-12-13 05:45:44 +05:30
sed -Ei "s#$base#/fonts#g" dist/assets/*