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

27 lines
1.1 KiB
Bash
Raw Normal View History

2022-10-26 12:57:48 +00:00
#!/bin/sh
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_API_URL vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_HTTP_PROXY"
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_SITE_NAME vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_NAME"
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_SITE_TITLE vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_TITLE"
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_SITE_DESCRIPTION vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_DESCRIPTION"
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_SITE_COLOR vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_COLOR"
2022-10-26 14:30:46 +00:00
echo "Check that we have NEXT_PUBLIC_SITE_URL vars"
2022-10-26 12:57:48 +00:00
test -n "$NEXT_PUBLIC_SITE_URL"
2022-10-26 14:32:37 +00:00
files=$(find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0)
$files $(sed -i "s#APP_NEXT_PUBLIC_HTTP_PROXY#$NEXT_PUBLIC_HTTP_PROXY#g")
$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_NAME#$NEXT_PUBLIC_SITE_NAME#g")
$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_TITLE#$NEXT_PUBLIC_SITE_TITLE#g")
$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_DESCRIPTION#$NEXT_PUBLIC_SITE_DESCRIPTION#g")
$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_COLOR#$NEXT_PUBLIC_SITE_COLOR#g")
$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_URL#$NEXT_NEXT_PUBLIC_SITE_URL#g")
2022-10-26 12:57:48 +00:00
echo "Starting NextJS"
exec "$@"