From a2e2c74a38c8e44646d6fdf4a7b0ecd92c12ce09 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 14 Sep 2023 06:43:19 +0100 Subject: [PATCH] Fix compatibility with busybox's grep. --- localizefonts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/localizefonts.sh b/localizefonts.sh index 072691bd..45a2c366 100755 --- a/localizefonts.sh +++ b/localizefonts.sh @@ -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")"