From 59c399ad9a3a39d08843dd452fc247804eec0645 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 16 Sep 2025 22:55:35 +0200 Subject: [PATCH 1/3] download external libraries within install script --- dashboard/index.html | 6 +++--- scripts/setup.sh | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dashboard/index.html b/dashboard/index.html index 0b16999..d86a037 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -4,7 +4,7 @@ - + PiOSK @@ -68,8 +68,8 @@

PiOSK

- - + + diff --git a/scripts/setup.sh b/scripts/setup.sh index f1cf1f2..6b17627 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -94,7 +94,6 @@ esac echo -e "${DEBUG}Architecture: '$ARCH', Binary: '$BINARY_NAME'${RESET}" - DOWNLOAD_URL="https://github.com/debloper/piosk/releases/download/$LATEST_RELEASE/$BINARY_NAME.tar.gz" echo -e "${INFO}Downloading from: $DOWNLOAD_URL${RESET}" @@ -107,6 +106,27 @@ chmod +x "$BINARY_NAME" mv "$BINARY_NAME" piosk echo -e "${SUCCESS}PiOSK binary downloaded successfully.${RESET}" +# --- JS/CSS Download --- + +FILES=( + "jquery-3.7.1.min.js|https://code.jquery.com/" + "bootstrap.bundle.min.js|https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/" + "bootstrap.min.css|https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/" +) + +for entry in "${FILES[@]}"; do + FILE="${entry%%|*}" + URL="${entry#*|}${FILE}" + echo -e "${INFO}Downloading from: $URL${RESET}" + + if ! curl -fL --progress-bar "$URL" -o "$PIOSK_DIR/web/$FILE"; then + echo -e "${ERROR}Failed to download $URL.${RESET}" + exit 1 + fi +done + +echo -e "${SUCCESS}external scripts downloaded successfully.${RESET}" + # --- Configuration Setup --- echo -e "${INFO}Restoring configurations...${RESET}" if [ ! -f /opt/piosk/config.json ]; then From 8a60bce19410d91d5bc711921252485defc01de4 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 21 Sep 2025 23:09:08 +0200 Subject: [PATCH 2/3] fixed web to dashboard path. Put files to libs folder. --- dashboard/index.html | 6 +++--- scripts/setup.sh | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dashboard/index.html b/dashboard/index.html index d86a037..c70b45b 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -4,7 +4,7 @@ - + PiOSK @@ -68,8 +68,8 @@

PiOSK

- - + + diff --git a/scripts/setup.sh b/scripts/setup.sh index 6b17627..9a1a621 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -114,12 +114,14 @@ FILES=( "bootstrap.min.css|https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/" ) +mkdir -p "$PIOSK_DIR/dashboard/libs" + for entry in "${FILES[@]}"; do FILE="${entry%%|*}" URL="${entry#*|}${FILE}" echo -e "${INFO}Downloading from: $URL${RESET}" - if ! curl -fL --progress-bar "$URL" -o "$PIOSK_DIR/web/$FILE"; then + if ! curl -fL --progress-bar "$URL" -o "$PIOSK_DIR/dashboard/libs/$FILE"; then echo -e "${ERROR}Failed to download $URL.${RESET}" exit 1 fi From 8a0941099f2a1b8447738bb7c883fca00b790b8b Mon Sep 17 00:00:00 2001 From: marcogruhl Date: Tue, 30 Sep 2025 02:41:32 +0200 Subject: [PATCH 3/3] Wording on success message Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- scripts/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 9a1a621..7b8e4ee 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -127,7 +127,7 @@ for entry in "${FILES[@]}"; do fi done -echo -e "${SUCCESS}external scripts downloaded successfully.${RESET}" +echo -e "${SUCCESS}External scripts downloaded successfully.${RESET}" # --- Configuration Setup --- echo -e "${INFO}Restoring configurations...${RESET}"