mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-03 20:47:38 +00:00
Compare commits
2 Commits
main
...
bump_selfh
Author | SHA1 | Date | |
---|---|---|---|
77c72b0c57 | |||
6a9f41c189 |
20
CHANGELOG.md
20
CHANGELOG.md
@ -16,26 +16,6 @@ All LXC instances created using this repository come pre-installed with Midnight
|
||||
|
||||
## 2025-07-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Zipline: Fix typo in uploads directory path [@tremor021](https://github.com/tremor021) ([#5662](https://github.com/community-scripts/ProxmoxVE/pull/5662))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Improve asset matching in fetch_and_deploy_gh_release for prebuild and singlefile modes [@MickLesk](https://github.com/MickLesk) ([#5669](https://github.com/community-scripts/ProxmoxVE/pull/5669))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Trilium [@MickLesk](https://github.com/MickLesk) ([#5665](https://github.com/community-scripts/ProxmoxVE/pull/5665))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Bump Icons to selfhst repo | switch svg to webp [@MickLesk](https://github.com/MickLesk) ([#5659](https://github.com/community-scripts/ProxmoxVE/pull/5659))
|
||||
|
||||
## 2025-07-02
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
@ -1,6 +1,6 @@
|
||||
______ _ ___ _ __ __
|
||||
/_ __/____(_) (_)_ ______ ___ / | / /___ / /____ _____
|
||||
/ / / ___/ / / / / / / __ `__ \ / |/ / __ \/ __/ _ \/ ___/
|
||||
/ / / / / / / / /_/ / / / / / / / /| / /_/ / /_/ __(__ )
|
||||
/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/ /_/ |_/\____/\__/\___/____/
|
||||
|
||||
______ _ ___
|
||||
/_ __/____(_) (_)_ ______ ___
|
||||
/ / / ___/ / / / / / / __ `__ \
|
||||
/ / / / / / / / /_/ / / / / / /
|
||||
/_/ /_/ /_/_/_/\__,_/_/ /_/ /_/
|
||||
|
||||
|
@ -31,7 +31,7 @@ function update_script() {
|
||||
touch /opt/${APP}_version.txt
|
||||
mkdir -p $HOME/.config/qBittorrent/
|
||||
mkdir -p /opt/qbittorrent/
|
||||
[ -d "/.config/qBittorrent" ] && mv /.config/qBittorrent "$HOME/.config/"
|
||||
mv /.config/qBittorrent $HOME/.config/
|
||||
$STD apt-get remove --purge -y qbittorrent-nox
|
||||
sed -i 's@ExecStart=/usr/bin/qbittorrent-nox@ExecStart=/opt/qbittorrent/qbittorrent-nox@g' /etc/systemd/system/qbittorrent-nox.service
|
||||
systemctl daemon-reload
|
||||
@ -67,4 +67,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8090${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8090${CL}"
|
@ -3,9 +3,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TriliumNext/Trilium
|
||||
# Source: https://triliumnext.github.io/Docs/
|
||||
|
||||
APP="Trilium Notes"
|
||||
APP="Trilium"
|
||||
var_tags="${var_tags:-notes}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
@ -27,52 +27,57 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/Trilium/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat ~/.Trilium 2>/dev/null)" ]] || [[ ! -f ~/.Trilium ]]; then
|
||||
|
||||
if [[ -d /opt/trilium/db ]]; then
|
||||
DB_PATH="/opt/trilium/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/db"
|
||||
elif [[ -d /opt/trilium/assets/db ]]; then
|
||||
DB_PATH="/opt/trilium/assets/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/assets/db"
|
||||
else
|
||||
msg_error "Database not found in either /opt/trilium/db or /opt/trilium/assets/db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Backing up Database"
|
||||
mkdir -p /opt/trilium_backup
|
||||
cp -r "${DB_PATH}" /opt/trilium_backup/
|
||||
rm -rf /opt/trilium
|
||||
msg_ok "Backed up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz"
|
||||
|
||||
msg_info "Restoring Database"
|
||||
mkdir -p "$(dirname "${DB_RESTORE_PATH}")"
|
||||
cp -r /opt/trilium_backup/$(basename "${DB_PATH}") "${DB_RESTORE_PATH}"
|
||||
msg_ok "Restored Database"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/trilium_backup
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start trilium
|
||||
sleep 1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt; fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "v${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
|
||||
if [[ -d /opt/trilium/db ]]; then
|
||||
DB_PATH="/opt/trilium/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/db"
|
||||
elif [[ -d /opt/trilium/assets/db ]]; then
|
||||
DB_PATH="/opt/trilium/assets/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/assets/db"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_error "Database not found in either /opt/trilium/db or /opt/trilium/assets/db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating to ${RELEASE}"
|
||||
mkdir -p /opt/trilium_backup
|
||||
cp -r "${DB_PATH}" /opt/trilium_backup/
|
||||
rm -rf /opt/trilium
|
||||
cd /tmp
|
||||
curl -fsSL "https://github.com/TriliumNext/trilium/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz" -o "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
tar -xf "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
mv "TriliumNextNotes-Server-${RELEASE}-linux-x64" /opt/trilium
|
||||
|
||||
# Restore database
|
||||
mkdir -p "$(dirname "${DB_RESTORE_PATH}")"
|
||||
cp -r /opt/trilium_backup/$(basename "${DB_PATH}") "${DB_RESTORE_PATH}"
|
||||
|
||||
echo "v${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated to ${RELEASE}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "/tmp/TriliumNextNotes-Server-${RELEASE}-linux-x64.tar.xz"
|
||||
rm -rf /opt/trilium_backup
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start trilium
|
||||
sleep 1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -40,9 +40,9 @@ function update_script() {
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cp /opt/zipline/.env /opt/
|
||||
mkdir -p /opt/zipline-uploads
|
||||
if [ -d /opt/zipline/uploads ] && [ "$(ls -A /opt/zipline/uploads)" ]; then
|
||||
cp -R /opt/zipline/uploads/* /opt/zipline-uploads/
|
||||
mkdir -p /opt/zipline-upload
|
||||
if [ -d /opt/zipline/upload ] && [ "$(ls -A /opt/zipline/upload)" ]; then
|
||||
cp -R /opt/zipline/upload/* /opt/zipline-upload/
|
||||
fi
|
||||
curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip")
|
||||
$STD unzip v"${RELEASE}".zip
|
||||
|
8
frontend/public/json/trilium.json
generated
8
frontend/public/json/trilium.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Trilium Notes",
|
||||
"name": "TriliumNext",
|
||||
"slug": "trilium",
|
||||
"categories": [
|
||||
12
|
||||
@ -9,11 +9,11 @@
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8080,
|
||||
"documentation": "https://github.com/TriliumNext/trilium/wiki",
|
||||
"documentation": "https://triliumnext.github.io/Docs/",
|
||||
"website": "https://github.com/TriliumNext/trilium",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/trilium-notes.webp",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/triliumnext.webp",
|
||||
"config_path": "/root/trilium-data/config.ini",
|
||||
"description": "Trilium Notes is the latest and officially maintained version of the powerful, self-hosted note-taking and personal knowledge management application. It enables users to organize information in a hierarchical tree structure and supports rich text editing, internal linking, images, attachments, and powerful scripting capabilities. This version reflects the most current development efforts under the TriliumNext organization and replaces all prior forks or legacy variants. Trilium is ideal for building personal wikis, structured documentation, and long-term knowledge archives, giving users full local control and privacy.",
|
||||
"description": "TriliumNext is an newer Fork of Trilium. TriliumNext is an open-source note-taking and personal knowledge management application. It allows users to organize and manage their notes, ideas, and information in a single place, using a hierarchical tree-like structure. Trilium offers a range of features, including rich text formatting, links, images, and attachments, making it easy to create and structure notes. The software is designed to be flexible and customizable, with a range of customization options and plugins available, including themes, export options, and more. Trilium is a self-hosted solution, and can be run on a local machine or a cloud-based server, providing users with full control over their notes and information.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
|
104
frontend/public/json/versions.json
generated
104
frontend/public/json/versions.json
generated
@ -1,49 +1,4 @@
|
||||
[
|
||||
{
|
||||
"name": "Dolibarr/dolibarr",
|
||||
"version": "18.0.7",
|
||||
"date": "2025-07-03T08:57:21Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "fumadocs-openapi@9.0.17",
|
||||
"date": "2025-07-03T06:57:48Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "preview-v0.1",
|
||||
"date": "2025-06-27T14:35:47Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.2111",
|
||||
"date": "2025-07-03T05:50:31Z"
|
||||
},
|
||||
{
|
||||
"name": "esphome/esphome",
|
||||
"version": "2025.6.3",
|
||||
"date": "2025-07-03T01:07:26Z"
|
||||
},
|
||||
{
|
||||
"name": "actualbudget/actual",
|
||||
"version": "v25.7.1",
|
||||
"date": "2025-07-03T01:03:18Z"
|
||||
},
|
||||
{
|
||||
"name": "mongodb/mongo",
|
||||
"version": "r6.0.25-rc0",
|
||||
"date": "2025-07-03T00:44:52Z"
|
||||
},
|
||||
{
|
||||
"name": "documenso/documenso",
|
||||
"version": "v1.12.2-rc.0",
|
||||
"date": "2025-07-03T00:31:22Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.7",
|
||||
"date": "2025-06-18T03:44:24Z"
|
||||
},
|
||||
{
|
||||
"name": "emqx/emqx",
|
||||
"version": "v5.8.7",
|
||||
@ -64,11 +19,6 @@
|
||||
"version": "8.2-rc1-int",
|
||||
"date": "2025-07-02T19:27:08Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.3.0",
|
||||
"date": "2025-07-02T12:26:44Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.9.5",
|
||||
@ -84,6 +34,16 @@
|
||||
"version": "2025.7.0",
|
||||
"date": "2025-07-02T16:23:42Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.7",
|
||||
"date": "2025-06-18T03:44:24Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "fumadocs-core@15.6.1",
|
||||
"date": "2025-07-02T15:29:41Z"
|
||||
},
|
||||
{
|
||||
"name": "nzbgetcom/nzbget",
|
||||
"version": "v25.1",
|
||||
@ -94,6 +54,11 @@
|
||||
"version": "6.2.5",
|
||||
"date": "2025-07-02T13:06:30Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.2.5",
|
||||
"date": "2025-05-28T06:49:43Z"
|
||||
},
|
||||
{
|
||||
"name": "wazuh/wazuh",
|
||||
"version": "coverity-w27-4.13.0",
|
||||
@ -114,6 +79,11 @@
|
||||
"version": "release-5.1.2",
|
||||
"date": "2025-07-02T06:13:16Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.2107",
|
||||
"date": "2025-07-02T05:53:02Z"
|
||||
},
|
||||
{
|
||||
"name": "diced/zipline",
|
||||
"version": "v4.2.0",
|
||||
@ -129,11 +99,21 @@
|
||||
"version": "2.1.1",
|
||||
"date": "2025-06-14T17:45:06Z"
|
||||
},
|
||||
{
|
||||
"name": "mongodb/mongo",
|
||||
"version": "r8.1.2",
|
||||
"date": "2025-07-01T22:39:32Z"
|
||||
},
|
||||
{
|
||||
"name": "Threadfin/Threadfin",
|
||||
"version": "1.2.35",
|
||||
"date": "2025-07-01T21:37:20Z"
|
||||
},
|
||||
{
|
||||
"name": "actualbudget/actual",
|
||||
"version": "v25.7.0",
|
||||
"date": "2025-07-01T21:02:27Z"
|
||||
},
|
||||
{
|
||||
"name": "TwiN/gatus",
|
||||
"version": "v5.19.0",
|
||||
@ -229,11 +209,21 @@
|
||||
"version": "v8.1.17",
|
||||
"date": "2025-06-30T11:26:27Z"
|
||||
},
|
||||
{
|
||||
"name": "documenso/documenso",
|
||||
"version": "v1.12.0-rc.8",
|
||||
"date": "2025-06-30T09:47:37Z"
|
||||
},
|
||||
{
|
||||
"name": "PrivateBin/PrivateBin",
|
||||
"version": "1.7.8",
|
||||
"date": "2025-06-30T09:00:54Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "preview-v0.1",
|
||||
"date": "2025-06-27T14:35:47Z"
|
||||
},
|
||||
{
|
||||
"name": "typesense/typesense",
|
||||
"version": "v29.0",
|
||||
@ -264,6 +254,11 @@
|
||||
"version": "3.1.0",
|
||||
"date": "2025-06-28T09:02:38Z"
|
||||
},
|
||||
{
|
||||
"name": "esphome/esphome",
|
||||
"version": "2025.6.2",
|
||||
"date": "2025-06-28T03:47:16Z"
|
||||
},
|
||||
{
|
||||
"name": "plexguide/Huntarr.io",
|
||||
"version": "8.1.11",
|
||||
@ -354,6 +349,11 @@
|
||||
"version": "4.1.0-beta.2",
|
||||
"date": "2025-06-26T14:23:26Z"
|
||||
},
|
||||
{
|
||||
"name": "Dolibarr/dolibarr",
|
||||
"version": "18.0.7",
|
||||
"date": "2025-06-26T09:16:33Z"
|
||||
},
|
||||
{
|
||||
"name": "gristlabs/grist-core",
|
||||
"version": "v1.6.1",
|
||||
@ -416,8 +416,8 @@
|
||||
},
|
||||
{
|
||||
"name": "runtipi/runtipi",
|
||||
"version": "v4.2.1",
|
||||
"date": "2025-06-03T20:04:28Z"
|
||||
"version": "nightly",
|
||||
"date": "2025-06-23T19:10:33Z"
|
||||
},
|
||||
{
|
||||
"name": "VictoriaMetrics/VictoriaMetrics",
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TriliumNext/Trilium
|
||||
# Source: https://triliumnext.github.io/Docs/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@ -13,7 +13,14 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz"
|
||||
msg_info "Setup TriliumNext"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/trilium/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/TriliumNext/trilium/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz" -o "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
tar -xf TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz
|
||||
mv TriliumNextNotes-Server-$RELEASE-linux-x64 /opt/trilium
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Setup TriliumNext"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/trilium.service
|
||||
@ -39,6 +46,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/TriliumNextNotes-Server-${RELEASE}-linux-x64.tar.xz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
@ -50,9 +50,9 @@ CORE_HOSTNAME=0.0.0.0
|
||||
CORE_PORT=3000
|
||||
CORE_RETURN_HTTPS=false
|
||||
DATASOURCE_TYPE=local
|
||||
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-uploads
|
||||
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-upload
|
||||
EOF
|
||||
mkdir -p /opt/zipline-uploads
|
||||
mkdir -p /opt/zipline-upload
|
||||
$STD pnpm install
|
||||
$STD pnpm build
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
|
@ -819,7 +819,6 @@ function fetch_and_deploy_gh_release() {
|
||||
|
||||
msg_info "Fetching GitHub release: $app ($version)"
|
||||
|
||||
### Tarball Mode ###
|
||||
if [[ "$mode" == "tarball" || "$mode" == "source" ]]; then
|
||||
url=$(echo "$json" | jq -r '.tarball_url // empty')
|
||||
[[ -z "$url" ]] && url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz"
|
||||
@ -840,7 +839,6 @@ function fetch_and_deploy_gh_release() {
|
||||
cp -r "$unpack_dir"/* "$target/"
|
||||
shopt -u dotglob nullglob
|
||||
|
||||
### Binary Mode ###
|
||||
elif [[ "$mode" == "binary" ]]; then
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture 2>/dev/null || uname -m)
|
||||
@ -850,14 +848,12 @@ function fetch_and_deploy_gh_release() {
|
||||
local assets url_match=""
|
||||
assets=$(echo "$json" | jq -r '.assets[].browser_download_url')
|
||||
|
||||
# If explicit filename pattern is provided (param $6), match that first
|
||||
if [[ -n "$6" ]]; then
|
||||
for u in $assets; do
|
||||
[[ "$u" =~ $6 || "$u" == *"$6" ]] && url_match="$u" && break
|
||||
done
|
||||
fi
|
||||
|
||||
# If no match via explicit pattern, fall back to architecture heuristic
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
@ -867,7 +863,6 @@ function fetch_and_deploy_gh_release() {
|
||||
done
|
||||
fi
|
||||
|
||||
# Fallback: any .deb file
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
[[ "$u" =~ \.deb$ ]] && url_match="$u" && break
|
||||
@ -896,10 +891,8 @@ function fetch_and_deploy_gh_release() {
|
||||
}
|
||||
}
|
||||
|
||||
### Prebuild Mode ###
|
||||
elif [[ "$mode" == "prebuild" ]]; then
|
||||
local pattern="${6%\"}"
|
||||
pattern="${pattern#\"}"
|
||||
local pattern="$6"
|
||||
[[ -z "$pattern" ]] && {
|
||||
msg_error "Mode 'prebuild' requires 6th parameter (asset filename pattern)"
|
||||
rm -rf "$tmpdir"
|
||||
@ -908,14 +901,7 @@ function fetch_and_deploy_gh_release() {
|
||||
|
||||
local asset_url=""
|
||||
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
|
||||
filename_candidate="${u##*/}"
|
||||
case "$filename_candidate" in
|
||||
$pattern)
|
||||
asset_url="$u"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ "$u" =~ $pattern || "$u" == *"$pattern" ]] && asset_url="$u" && break
|
||||
done
|
||||
|
||||
[[ -z "$asset_url" ]] && {
|
||||
@ -937,18 +923,16 @@ function fetch_and_deploy_gh_release() {
|
||||
$STD apt-get install -y unzip
|
||||
fi
|
||||
$STD unzip "$tmpdir/$filename" -d "$target"
|
||||
elif [[ "$filename" == *.tar.* ]]; then
|
||||
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
||||
elif [[ "$filename" == *.tar.gz ]]; then
|
||||
tar -xzf "$tmpdir/$filename" -C "$target"
|
||||
else
|
||||
msg_error "Unsupported archive format: $filename"
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
### Singlefile Mode ###
|
||||
elif [[ "$mode" == "singlefile" ]]; then
|
||||
local pattern="${6%\"}"
|
||||
pattern="${pattern#\"}"
|
||||
local pattern="$6"
|
||||
[[ -z "$pattern" ]] && {
|
||||
msg_error "Mode 'singlefile' requires 6th parameter (asset filename pattern)"
|
||||
rm -rf "$tmpdir"
|
||||
@ -957,13 +941,7 @@ function fetch_and_deploy_gh_release() {
|
||||
|
||||
local asset_url=""
|
||||
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
|
||||
filename_candidate="${u##*/}"
|
||||
case "$filename_candidate" in
|
||||
$pattern)
|
||||
asset_url="$u"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
[[ "$u" =~ $pattern || "$u" == *"$pattern" ]] && asset_url="$u" && break
|
||||
done
|
||||
|
||||
[[ -z "$asset_url" ]] && {
|
||||
|
Reference in New Issue
Block a user