This repository has been archived on 2023-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
beatsaber-overlay/entrypoint.sh

38 lines
1.7 KiB
Bash
Raw Normal View History

2022-10-26 12:57:48 +00:00
#!/bin/sh
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_API_URL env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_HTTP_PROXY"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_HTTP_PROXY"
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_SITE_NAME env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_NAME"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_SITE_NAME"
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_SITE_TITLE env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_TITLE"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_SITE_TITLE"
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_SITE_DESCRIPTION env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_DESCRIPTION"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_SITE_DESCRIPTION"
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_SITE_COLOR env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_COLOR"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_SITE_COLOR"
2022-10-26 14:38:23 +00:00
echo "Checking that NEXT_PUBLIC_SITE_URL env-var exists"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_URL"
2022-10-26 15:11:45 +00:00
echo "Found $NEXT_PUBLIC_SITE_URL"
2022-10-26 12:57:48 +00:00
2022-10-26 14:38:23 +00:00
echo "Ignore permission errors below"
2022-10-26 14:32:37 +00:00
2022-10-26 14:59:49 +00:00
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_HTTP_PROXY#$NEXT_PUBLIC_HTTP_PROXY#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_NAME#$NEXT_PUBLIC_SITE_NAME#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_TITLE#$NEXT_PUBLIC_SITE_TITLE#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_DESCRIPTION#$NEXT_PUBLIC_SITE_DESCRIPTION#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_COLOR#$NEXT_PUBLIC_SITE_COLOR#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_URL#$NEXT_PUBLIC_SITE_URL#g"
2022-10-26 12:57:48 +00:00
echo "Starting NextJS"
exec "$@"
2022-10-26 14:55:05 +00:00