Fix compatibility with busybox's grep.

This commit is contained in:
Kavin 2023-09-14 06:43:19 +01:00
parent 23c0dc50bf
commit a2e2c74a38
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F

View File

@ -1,7 +1,8 @@
#!/bin/sh
base='https://fonts\.(gstatic\.com|kavin\.rocks)'
fonts=$(cat dist/assets/* | grep -Po "$base[^)]*" | sort | uniq)
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")"