From a96df7daa1aa4f7d23c89c450472e8d7d3f28695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=8E=E7=94=9F=E6=B4=BECoder=EF=BD=9E?= Date: Tue, 3 Mar 2026 00:24:36 +0800 Subject: [PATCH] fix installer webui dist extraction path --- install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 966da88..59437c9 100644 --- a/install.sh +++ b/install.sh @@ -102,8 +102,15 @@ if curl -fSL "$WEBUI_URL" -o "$WEBUI_OUT"; then mkdir -p "$WEBUI_TMP" tar -xzf "$WEBUI_OUT" -C "$WEBUI_TMP" + WEBUI_DIST_DIR="" if [[ -d "$WEBUI_TMP/dist" ]]; then - rsync -a --delete "$WEBUI_TMP/dist/" "$WEBUI_DIR/" + WEBUI_DIST_DIR="$WEBUI_TMP/dist" + else + WEBUI_DIST_DIR="$(find "$WEBUI_TMP" -mindepth 2 -maxdepth 4 -type d -name dist | head -n1)" + fi + + if [[ -n "$WEBUI_DIST_DIR" && -d "$WEBUI_DIST_DIR" ]]; then + rsync -a --delete "$WEBUI_DIST_DIR/" "$WEBUI_DIR/" else rsync -a --delete "$WEBUI_TMP/" "$WEBUI_DIR/" fi