From f4572c161f8ca26cb9358072c940b25167c275d1 Mon Sep 17 00:00:00 2001 From: Frikky Date: Mon, 6 May 2024 23:04:37 +0200 Subject: [PATCH] Added subpath rewrite script --- frontend/enable_subpathing.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 frontend/enable_subpathing.sh diff --git a/frontend/enable_subpathing.sh b/frontend/enable_subpathing.sh new file mode 100644 index 00000000..a6f76db4 --- /dev/null +++ b/frontend/enable_subpathing.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Sekerovic Dragan, oneStep2 GmbH - 2023-09-08 - quick and dirty +# purpose of the script: make shuffle reverse proxyable/run shuffle on a subpath instead of root + +if $(ls frontend/src/App.jsx.orig.* 1>/dev/null 2>&1); then + echo "shuffle src already patched for subpathing!" + echo "Aborting ..." + exit 1 +fi + +[[ "$1" != "" ]] && SUBPATH=$1 || SUBPATH="/shuffle" + +cat $0.tpl | sed "s,SUBPATH,$SUBPATH," > $0.run +chmod 700 $0.run +./$0.run +rm ./$0.run + +exit 0