starbase-81/docker-entrypoint.sh

14 lines
402 B
Bash
Raw Normal View History

2023-04-21 00:53:59 +00:00
#!/bin/sh
# Escape slashes
2023-04-21 04:47:52 +00:00
LOGO=${LOGO//\//\\/}
2023-04-21 04:43:30 +00:00
# HTML replacement
sed -i -e 's/HTMLTITLE/'"${TITLE}"'/g' /app/index.html
# TypeScript replacement
2023-04-21 21:20:58 +00:00
sed -i -e 's/(PAGETITLE = ")My Website(")/'"$1${TITLE}$2"'/g' /app/src/variables.ts
sed -i -e 's/(PAGEICON = ")\/logo\.png(")/'"$1${LOGO}$2"'/g' /app/src/variables.ts
sed -i -e 's/(SHOWHEADER = )false/'"$1${HEADER}"'/g' /app/src/variables.ts
2023-04-21 04:43:30 +00:00
2023-04-21 00:53:59 +00:00
exec "$@"