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
2022-10-26 15:59:49 +01:00

27 lines
1.5 KiB
Bash

#!/bin/sh
echo "Checking that NEXT_PUBLIC_API_URL env-var exists"
test -n "$NEXT_PUBLIC_HTTP_PROXY"
echo "Checking that NEXT_PUBLIC_SITE_NAME env-var exists"
test -n "$NEXT_PUBLIC_SITE_NAME"
echo "Checking that NEXT_PUBLIC_SITE_TITLE env-var exists"
test -n "$NEXT_PUBLIC_SITE_TITLE"
echo "Checking that NEXT_PUBLIC_SITE_DESCRIPTION env-var exists"
test -n "$NEXT_PUBLIC_SITE_DESCRIPTION"
echo "Checking that NEXT_PUBLIC_SITE_COLOR env-var exists"
test -n "$NEXT_PUBLIC_SITE_COLOR"
echo "Checking that NEXT_PUBLIC_SITE_URL env-var exists"
test -n "$NEXT_PUBLIC_SITE_URL"
echo "Ignore permission errors below"
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"
echo "Starting NextJS"
exec "$@"