Skip to content

Commit

Permalink
Improved compatibility of CJK font installation on Alpine.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Nov 30, 2024
1 parent 06bb023 commit d5db45f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rootfs/etc/cont-init.d/15-cjk-font.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ if is-bool-val-true "${ENABLE_CJK_FONT:-0}"; then
echo "CJK font already installed."
else
echo "installing CJK font..."
if [ -n "$(which apk)" ]; then
add-pkg font-wqy-zenhei --repository "${PACKAGES_MIRROR:-https://dl-cdn.alpinelinux.org/alpine}/edge/community"
if command -v apk >/dev/null; then
if apk --no-cache info font-wqy-zenhei > /dev/null
then
add-pkg font-wqy-zenhei
else
add-pkg font-wqy-zenhei --repository "${PACKAGES_MIRROR:-https://dl-cdn.alpinelinux.org/alpine}/v3.19/community"
fi
else
add-pkg fonts-wqy-zenhei
fi
Expand Down

0 comments on commit d5db45f

Please sign in to comment.