mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-09 09:48:22 +00:00
11 lines
302 B
Bash
11 lines
302 B
Bash
|
#/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/*
|