mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-10-10 01:18:23 +00:00
added script to download and serve fonts locally by default
This commit is contained in:
10
localizefonts.sh
Executable file
10
localizefonts.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#/bin/sh
|
||||
|
||||
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##")"
|
||||
mkdir -p "$(dirname "$file")"
|
||||
curl -L "$font" -o "$file"
|
||||
done
|
||||
sed -i "s#$base#/fonts#g" dist/assets/*
|
Reference in New Issue
Block a user