Compare commits

...

8 Commits

Author SHA1 Message Date
MickLesk
947d032f96 fix(tools): replace raw GitHub API curl calls with get_latest_github_release 2026-05-23 23:12:31 +02:00
community-scripts-pr-app[bot]
6c7e7ae1af Update CHANGELOG.md (#14667)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-23 10:37:01 +02:00
SystemIdleProcess
a73aefa8fd IronClaw: Extra configuration during install to ensure Web Gateway can run (#14635)
* configure gateway during install for best chance of it not getting disabled

* add missing dbus-run-session on service

* add back chmod to .env file

* remove extra character

* add back mkdir for /root/.ironclaw

* remove erroneous msg blocks, service env values and tab in post completion gateway line
2026-05-23 10:13:57 +02:00
community-scripts-pr-app[bot]
599e841e1a Update CHANGELOG.md (#14666)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-23 08:13:21 +00:00
SystemIdleProcess
cf5db6b687 Tunarr: fix path to backup during update (#14655)
* increase default ram due to oom-killer logs during library scans and fix backup path checking

* fix ram value

* revert resource changes

* correct disk size
2026-05-23 10:12:59 +02:00
Claudiu Hojda
26b1adfbcc kernel-clean: support range syntax in selection prompt (#14656)
Allow selecting kernels with ranges (e.g. 1-5) and mixed
expressions (e.g. 1,3-5,7) in addition to the existing
comma-separated syntax.
2026-05-23 09:59:17 +02:00
community-scripts-pr-app[bot]
b97f8b9236 Update CHANGELOG.md (#14665)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-23 07:48:25 +00:00
Tobias
de2806ca54 wealthfolio: add: prebuild (#14658) 2026-05-23 09:48:03 +02:00
10 changed files with 132 additions and 155 deletions

View File

@@ -464,6 +464,25 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details> </details>
## 2026-05-23
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- IronClaw: Extra configuration during install to ensure Web Gateway can run [@SystemIdleProcess](https://github.com/SystemIdleProcess) ([#14635](https://github.com/community-scripts/ProxmoxVE/pull/14635))
- Tunarr: fix path to backup during update [@SystemIdleProcess](https://github.com/SystemIdleProcess) ([#14655](https://github.com/community-scripts/ProxmoxVE/pull/14655))
- #### ✨ New Features
- wealthfolio: add: prebuild [@CrazyWolf13](https://github.com/CrazyWolf13) ([#14658](https://github.com/community-scripts/ProxmoxVE/pull/14658))
### 🧰 Tools
- #### ✨ New Features
- kernel-clean: support range syntax in selection prompt [@djhojd](https://github.com/djhojd) ([#14656](https://github.com/community-scripts/ProxmoxVE/pull/14656))
## 2026-05-22 ## 2026-05-22
### 🆕 New Scripts ### 🆕 New Scripts

View File

@@ -60,11 +60,12 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Complete setup by running:${CL}" echo -e "${INFO}${YW} Next Steps:${CL}"
echo -e "${TAB}${BGN}ironclaw onboard${CL}" echo -e "${TAB}1. Complete setup by running:${CL}"
echo -e "${INFO}${YW} Then start the service:${CL}" echo -e "${TAB}${TAB}${BGN}/usr/local/bin/ironclaw onboard${CL}"
echo -e "${TAB}${BGN}rc-service ironclaw start${CL}" echo -e "${TAB}2. Start the service:${CL}"
echo -e "${INFO}${YW} Access the Web UI at:${CL}" echo -e "${TAB}${TAB}${BGN}rc-service ironclaw start${CL}"
echo -e "${TAB}3. Access the Web UI at:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
echo -e "${INFO}${YW} Auth token and database credentials:${CL}" echo -e "${INFO}${YW} Use Gateway Authentication Token to login:${CL}"
echo -e "${TAB}${BGN}cat /root/.ironclaw/.env${CL}" echo -e "${TAB}${TAB}${BGN}cat /root/.ironclaw/gateway.creds${CL}"

View File

@@ -40,7 +40,7 @@ function update_script() {
msg_ok "Backed up Configuration" msg_ok "Backed up Configuration"
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \ fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
"ironclaw-$(uname -m)-unknown-linux-$([[ -f /etc/alpine-release ]] && echo "musl" || echo "gnu").tar.gz" "ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz"
chmod +x /usr/local/bin/ironclaw chmod +x /usr/local/bin/ironclaw
msg_info "Restoring Configuration" msg_info "Restoring Configuration"
@@ -62,11 +62,12 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Complete setup by running:${CL}" echo -e "${INFO}${YW} Next Steps:${CL}"
echo -e "${TAB}${BGN}ironclaw onboard${CL}" echo -e "${TAB}1. Configure remaining settings:${CL}"
echo -e "${INFO}${YW} Then start the service:${CL}" echo -e "${TAB}${TAB}${BGN}/usr/local/bin/ironclaw onboard${CL}"
echo -e "${TAB}${BGN}systemctl start ironclaw${CL}" echo -e "${TAB}2. Start the service:${CL}"
echo -e "${INFO}${YW} Access the Web UI at:${CL}" echo -e "${TAB}${TAB}${BGN}systemctl start ironclaw${CL}"
echo -e "${TAB}3. Access the Web UI at:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
echo -e "${INFO}${YW} Auth token and database credentials:${CL}" echo -e "${INFO}${YW} Use Gateway Authentication Token to login:${CL}"
echo -e "${TAB}${BGN}cat /root/.ironclaw/.env${CL}" echo -e "${TAB}${TAB}${BGN}cat /root/.ironclaw/gateway.creds${CL}"

View File

@@ -34,11 +34,11 @@ function update_script() {
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" msg_info "Creating Backup"
if [ -d "/usr/local/share/tunarr" ]; then if [ -d "/root/.local/share/tunarr" ]; then
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /usr/local/share/tunarr $STD tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /root/.local/share/tunarr $STD
msg_ok "Backup Created" msg_ok "Backup Created"
else else
msg_error "Backup failed: /usr/local/share/tunarr does not exist" msg_error "Backup failed: /root/.local/share/tunarr does not exist"
fi fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "prebuild" "latest" "/opt/tunarr" "*linux-x64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "prebuild" "latest" "/opt/tunarr" "*linux-x64.tar.gz"

View File

@@ -3,13 +3,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: CrazyWolf13 # Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://wealthfolio.app/ | Github: https://github.com/afadil/wealthfolio # Source: https://wealthfolio.app/ | Github: https://github.com/wealthfolio/wealthfolio
APP="Wealthfolio" APP="Wealthfolio"
var_tags="${var_tags:-finance;portfolio}" var_tags="${var_tags:-finance;portfolio}"
var_cpu="${var_cpu:-4}" var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-4096}" var_ram="${var_ram:-512}"
var_disk="${var_disk:-10}" var_disk="${var_disk:-4}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_arm64="${var_arm64:-no}" var_arm64="${var_arm64:-no}"
@@ -30,13 +30,11 @@ function update_script() {
exit exit
fi fi
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
if grep -q '^WF_CORS_ALLOW_ORIGINS=\*$' /opt/wealthfolio/.env; then if grep -q '^WF_CORS_ALLOW_ORIGINS=\*$' /opt/wealthfolio/.env; then
sed -i "s|^WF_CORS_ALLOW_ORIGINS=\*$|WF_CORS_ALLOW_ORIGINS=http://${LOCAL_IP}:8080|" /opt/wealthfolio/.env sed -i "s|^WF_CORS_ALLOW_ORIGINS=\*$|WF_CORS_ALLOW_ORIGINS=http://${LOCAL_IP}:8080|" /opt/wealthfolio/.env
fi fi
if check_for_gh_release "wealthfolio" "afadil/wealthfolio"; then if check_for_gh_release "wealthfolio" "wealthfolio/wealthfolio"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop wealthfolio systemctl stop wealthfolio
msg_ok "Stopped Service" msg_ok "Stopped Service"
@@ -46,21 +44,8 @@ function update_script() {
cp /opt/wealthfolio/.env /opt/wealthfolio_env_backup cp /opt/wealthfolio/.env /opt/wealthfolio_env_backup
msg_ok "Backed up Data" msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wealthfolio" "afadil/wealthfolio" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wealthfolio" "wealthfolio/wealthfolio" "prebuild" "latest" "/opt/wealthfolio" "wealthfolio-server-*-linux-amd64.tar.gz"
install -m 755 /opt/wealthfolio/wealthfolio-server /usr/local/bin/wealthfolio-server
msg_info "Building Frontend (patience)"
cd /opt/wealthfolio
export BUILD_TARGET=web
$STD pnpm install --frozen-lockfile
$STD pnpm --filter frontend... build
msg_ok "Built Frontend"
msg_info "Building Backend (patience)"
source ~/.cargo/env
$STD cargo build --release --manifest-path apps/server/Cargo.toml
cp /opt/wealthfolio/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
chmod +x /usr/local/bin/wealthfolio-server
msg_ok "Built Backend"
msg_info "Restoring Data" msg_info "Restoring Data"
cp -r /opt/wealthfolio_data_backup/. /opt/wealthfolio_data cp -r /opt/wealthfolio_data_backup/. /opt/wealthfolio_data
@@ -68,12 +53,6 @@ function update_script() {
rm -rf /opt/wealthfolio_data_backup /opt/wealthfolio_env_backup rm -rf /opt/wealthfolio_data_backup /opt/wealthfolio_env_backup
msg_ok "Restored Data" msg_ok "Restored Data"
msg_info "Cleaning Up"
rm -rf /opt/wealthfolio/target
rm -rf /root/.cargo/registry
rm -rf /opt/wealthfolio/node_modules
msg_ok "Cleaned Up"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start wealthfolio systemctl start wealthfolio
msg_ok "Started Service" msg_ok "Started Service"

View File

@@ -35,20 +35,41 @@ fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest"
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz" "ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
chmod +x /usr/local/bin/ironclaw chmod +x /usr/local/bin/ironclaw
msg_info "Configuring IronClaw" msg_info "Configuring Environment"
mkdir -p /root/.ironclaw
GATEWAY_TOKEN=$(openssl rand -hex 32) GATEWAY_TOKEN=$(openssl rand -hex 32)
mkdir -p /root/.ironclaw
{
echo "Gateway-Token"
echo "Token: $GATEWAY_TOKEN"
} >> /root/.ironclaw/gateway.creds
mkdir -p /root/.ironclaw
cat <<EOF >/root/.ironclaw/.env cat <<EOF >/root/.ironclaw/.env
DATABASE_BACKEND=postgres
DATABASE_URL=postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable DATABASE_URL=postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable
GATEWAY_ENABLED=true GATEWAY_ENABLED=true
GATEWAY_HOST=0.0.0.0 GATEWAY_HOST=0.0.0.0
GATEWAY_PORT=3000 GATEWAY_PORT=3000
GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN} GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN}
CLI_ENABLED=false CLI_ENABLED=false
AGENT_NAME=ironclaw
RUST_LOG=ironclaw=info,tower_http=info RUST_LOG=ironclaw=info,tower_http=info
EOF EOF
chmod 600 /root/.ironclaw/.env chmod 600 /root/.ironclaw/.env
msg_ok "Configured Environment"
msg_info "Configuring IronClaw"
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable" >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
sleep 5
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
msg_ok "Configured IronClaw" msg_ok "Configured IronClaw"
msg_info "Creating Service" msg_info "Creating Service"

View File

@@ -24,23 +24,44 @@ PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \ fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
"ironclaw-$(uname -m)-unknown-linux-$([[ -f /etc/alpine-release ]] && echo "musl" || echo "gnu").tar.gz" "ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz"
chmod +x /usr/local/bin/ironclaw chmod +x /usr/local/bin/ironclaw
msg_info "Configuring IronClaw" msg_info "Configuring Environment"
mkdir -p /root/.ironclaw
GATEWAY_TOKEN=$(openssl rand -hex 32) GATEWAY_TOKEN=$(openssl rand -hex 32)
mkdir -p /root/.ironclaw
{
echo "Gateway-Token"
echo "Token: $GATEWAY_TOKEN"
} >> /root/.ironclaw/gateway.creds
mkdir -p /root/.ironclaw
cat <<EOF >/root/.ironclaw/.env cat <<EOF >/root/.ironclaw/.env
DATABASE_BACKEND=postgres
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable
GATEWAY_ENABLED=true GATEWAY_ENABLED=true
GATEWAY_HOST=0.0.0.0 GATEWAY_HOST=0.0.0.0
GATEWAY_PORT=3000 GATEWAY_PORT=3000
GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN} GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN}
CLI_ENABLED=false CLI_ENABLED=false
AGENT_NAME=ironclaw
RUST_LOG=ironclaw=info,tower_http=info RUST_LOG=ironclaw=info,tower_http=info
EOF EOF
chmod 600 /root/.ironclaw/.env chmod 600 /root/.ironclaw/.env
msg_ok "Configured Environment"
msg_info "Configuring IronClaw"
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable" >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
sleep 5
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
msg_ok "Configured IronClaw" msg_ok "Configured IronClaw"
msg_info "Creating Service" msg_info "Creating Service"
@@ -51,10 +72,7 @@ After=network.target postgresql.service
[Service] [Service]
Type=simple Type=simple
User=root ExecStart=/usr/bin/dbus-run-session /usr/local/bin/ironclaw run
WorkingDirectory=/root
EnvironmentFile=/root/.ironclaw/.env
ExecStart=/usr/bin/dbus-run-session /usr/local/bin/ironclaw
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5

View File

@@ -3,7 +3,7 @@
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: CrazyWolf13 # Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://wealthfolio.app/ | Github: https://github.com/afadil/wealthfolio # Source: https://wealthfolio.app/ | Github: https://github.com/wealthfolio/wealthfolio
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
@@ -14,31 +14,14 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y \ $STD apt install -y argon2
pkg-config \
libssl-dev \
build-essential \
libsqlite3-dev \
argon2
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
setup_rust fetch_and_deploy_gh_release "wealthfolio" "wealthfolio/wealthfolio" "prebuild" "latest" "/opt/wealthfolio" "wealthfolio-server-*-linux-amd64.tar.gz"
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
fetch_and_deploy_gh_release "wealthfolio" "afadil/wealthfolio" "tarball"
msg_info "Building Frontend (patience)" msg_info "Installing Wealthfolio"
cd /opt/wealthfolio install -m 755 /opt/wealthfolio/wealthfolio-server /usr/local/bin/wealthfolio-server
export BUILD_TARGET=web msg_ok "Installed Wealthfolio"
$STD pnpm install --frozen-lockfile
$STD pnpm --filter frontend... build
msg_ok "Built Frontend"
msg_info "Building Backend (patience)"
source ~/.cargo/env
$STD cargo build --release --manifest-path apps/server/Cargo.toml
cp /opt/wealthfolio/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
chmod +x /usr/local/bin/wealthfolio-server
msg_ok "Built Backend"
msg_info "Configuring Wealthfolio" msg_info "Configuring Wealthfolio"
mkdir -p /opt/wealthfolio_data mkdir -p /opt/wealthfolio_data
@@ -57,12 +40,6 @@ EOF
echo "WF_PASSWORD=${WF_PASSWORD}" >~/wealthfolio.creds echo "WF_PASSWORD=${WF_PASSWORD}" >~/wealthfolio.creds
msg_ok "Configured Wealthfolio" msg_ok "Configured Wealthfolio"
msg_info "Cleaning Up"
rm -rf /opt/wealthfolio/target
rm -rf /root/.cargo/registry
rm -rf /opt/wealthfolio/node_modules
msg_ok "Cleaned Up"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/wealthfolio.service cat <<EOF >/etc/systemd/system/wealthfolio.service
[Unit] [Unit]

View File

@@ -4269,12 +4269,10 @@ function setup_gs() {
ensure_dependencies jq ensure_dependencies jq
local RELEASE_JSON local LATEST_VERSION
RELEASE_JSON=$(curl -fsSL --max-time 15 https://api.github.com/repos/ArtifexSoftware/ghostpdl-downloads/releases/latest 2>/dev/null || echo "") # Tags are "gs10.05.1" format — fetch without stripping "v", then strip "gs"
LATEST_VERSION=$(get_latest_github_release "ArtifexSoftware/ghostpdl-downloads" "false") || {
if [[ -z "$RELEASE_JSON" ]]; then
msg_warn "Cannot fetch latest Ghostscript version from GitHub API" msg_warn "Cannot fetch latest Ghostscript version from GitHub API"
# Try to get from current version
if command -v gs &>/dev/null; then if command -v gs &>/dev/null; then
gs --version | head -n1 gs --version | head -n1
cache_installed_version "ghostscript" "$CURRENT_VERSION" cache_installed_version "ghostscript" "$CURRENT_VERSION"
@@ -4282,11 +4280,9 @@ function setup_gs() {
fi fi
msg_error "Cannot determine Ghostscript version and no existing installation found" msg_error "Cannot determine Ghostscript version and no existing installation found"
return 250 return 250
fi }
local LATEST_VERSION LATEST_VERSION="${LATEST_VERSION#gs}"
LATEST_VERSION=$(echo "$RELEASE_JSON" | jq -r '.tag_name' | sed 's/^gs//') local LATEST_VERSION_DOTTED="$LATEST_VERSION"
local LATEST_VERSION_DOTTED
LATEST_VERSION_DOTTED=$(echo "$RELEASE_JSON" | jq -r '.name' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
if [[ -z "$LATEST_VERSION" || -z "$LATEST_VERSION_DOTTED" ]]; then if [[ -z "$LATEST_VERSION" || -z "$LATEST_VERSION_DOTTED" ]]; then
msg_warn "Could not determine latest Ghostscript version from GitHub - checking system" msg_warn "Could not determine latest Ghostscript version from GitHub - checking system"
@@ -7336,22 +7332,11 @@ function setup_ruby() {
# Download and build rbenv if needed # Download and build rbenv if needed
if [[ ! -x "$RBENV_BIN" ]]; then if [[ ! -x "$RBENV_BIN" ]]; then
local RBENV_RELEASE local RBENV_RELEASE
local rbenv_json RBENV_RELEASE=$(get_latest_github_release "rbenv/rbenv") || {
rbenv_json=$(curl -fsSL --max-time 15 https://api.github.com/repos/rbenv/rbenv/releases/latest 2>/dev/null || echo "")
if [[ -z "$rbenv_json" ]]; then
msg_error "Failed to fetch latest rbenv version from GitHub" msg_error "Failed to fetch latest rbenv version from GitHub"
rm -rf "$TMP_DIR" rm -rf "$TMP_DIR"
return 7 return 7
fi }
RBENV_RELEASE=$(echo "$rbenv_json" | jq -r '.tag_name' 2>/dev/null | sed 's/^v//' || echo "")
if [[ -z "$RBENV_RELEASE" ]]; then
msg_error "Could not parse rbenv version from GitHub response"
rm -rf "$TMP_DIR"
return 250
fi
if ! curl_with_retry "https://github.com/rbenv/rbenv/archive/refs/tags/v${RBENV_RELEASE}.tar.gz" "$TMP_DIR/rbenv.tar.gz"; then if ! curl_with_retry "https://github.com/rbenv/rbenv/archive/refs/tags/v${RBENV_RELEASE}.tar.gz" "$TMP_DIR/rbenv.tar.gz"; then
msg_error "Failed to download rbenv" msg_error "Failed to download rbenv"
@@ -7383,22 +7368,11 @@ function setup_ruby() {
# Install ruby-build plugin # Install ruby-build plugin
if [[ ! -d "$RBENV_DIR/plugins/ruby-build" ]]; then if [[ ! -d "$RBENV_DIR/plugins/ruby-build" ]]; then
local RUBY_BUILD_RELEASE local RUBY_BUILD_RELEASE
local ruby_build_json RUBY_BUILD_RELEASE=$(get_latest_github_release "rbenv/ruby-build") || {
ruby_build_json=$(curl -fsSL --max-time 15 https://api.github.com/repos/rbenv/ruby-build/releases/latest 2>/dev/null || echo "")
if [[ -z "$ruby_build_json" ]]; then
msg_error "Failed to fetch latest ruby-build version from GitHub" msg_error "Failed to fetch latest ruby-build version from GitHub"
rm -rf "$TMP_DIR" rm -rf "$TMP_DIR"
return 7 return 7
fi }
RUBY_BUILD_RELEASE=$(echo "$ruby_build_json" | jq -r '.tag_name' 2>/dev/null | sed 's/^v//' || echo "")
if [[ -z "$RUBY_BUILD_RELEASE" ]]; then
msg_error "Could not parse ruby-build version from GitHub response"
rm -rf "$TMP_DIR"
return 250
fi
if ! curl_with_retry "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.tar.gz" "$TMP_DIR/ruby-build.tar.gz"; then if ! curl_with_retry "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.tar.gz" "$TMP_DIR/ruby-build.tar.gz"; then
msg_error "Failed to download ruby-build" msg_error "Failed to download ruby-build"
@@ -7781,8 +7755,7 @@ function setup_clickhouse() {
# Fallback to GitHub API if package server failed # Fallback to GitHub API if package server failed
if [[ -z "$CLICKHOUSE_VERSION" ]]; then if [[ -z "$CLICKHOUSE_VERSION" ]]; then
CLICKHOUSE_VERSION=$(curl -fsSL --max-time 15 https://api.github.com/repos/ClickHouse/ClickHouse/releases/latest 2>/dev/null | CLICKHOUSE_VERSION=$(get_latest_github_release "ClickHouse/ClickHouse") || true
grep -oP '"tag_name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n1 || echo "")
fi fi
[[ -z "$CLICKHOUSE_VERSION" ]] && { [[ -z "$CLICKHOUSE_VERSION" ]] && {
@@ -8071,22 +8044,11 @@ function setup_uv() {
ensure_dependencies jq ensure_dependencies jq
# Fetch latest version # Fetch latest version
local releases_json local LATEST_VERSION
releases_json=$(curl -fsSL --max-time 15 \ LATEST_VERSION=$(get_latest_github_release "astral-sh/uv") || {
"https://api.github.com/repos/astral-sh/uv/releases/latest" 2>/dev/null || echo "")
if [[ -z "$releases_json" ]]; then
msg_error "Could not fetch latest uv version from GitHub API" msg_error "Could not fetch latest uv version from GitHub API"
return 7 return 7
fi }
local LATEST_VERSION
LATEST_VERSION=$(echo "$releases_json" | jq -r '.tag_name' 2>/dev/null | sed 's/^v//')
if [[ -z "$LATEST_VERSION" ]]; then
msg_error "Could not parse uv version from GitHub API response"
return 250
fi
# Get currently installed version # Get currently installed version
local INSTALLED_VERSION="" local INSTALLED_VERSION=""
@@ -8213,22 +8175,11 @@ function setup_yq() {
fi fi
local LATEST_VERSION local LATEST_VERSION
local releases_json LATEST_VERSION=$(get_latest_github_release "${GITHUB_REPO}") || {
releases_json=$(curl -fsSL --max-time 15 "https://api.github.com/repos/${GITHUB_REPO}/releases/latest" 2>/dev/null || echo "")
if [[ -z "$releases_json" ]]; then
msg_error "Could not fetch latest yq version from GitHub API" msg_error "Could not fetch latest yq version from GitHub API"
rm -rf "$TMP_DIR" rm -rf "$TMP_DIR"
return 250 return 250
fi }
LATEST_VERSION=$(echo "$releases_json" | jq -r '.tag_name' 2>/dev/null | sed 's/^v//' || echo "")
if [[ -z "$LATEST_VERSION" ]]; then
msg_error "Could not parse yq version from GitHub API response"
rm -rf "$TMP_DIR"
return 250
fi
# Get currently installed version # Get currently installed version
local INSTALLED_VERSION="" local INSTALLED_VERSION=""

View File

@@ -41,13 +41,23 @@ echo -e "${GN}Currently running kernel: ${current_kernel}${CL}"
echo -e "${YW}Available kernels for removal:${CL}" echo -e "${YW}Available kernels for removal:${CL}"
echo "$available_kernels" | nl -w 2 -s '. ' echo "$available_kernels" | nl -w 2 -s '. '
echo -e "\n${YW}Select kernels to remove (comma-separated, e.g., 1,2):${CL}" echo -e "\n${YW}Select kernels to remove (e.g. 1,3 or 1-5 or 1-3,7):${CL}"
read -r selected read -r selected
# Parse selection # Parse selection: supports single indices, ranges (e.g., 1-5), and combinations (e.g., 1,3-5,7)
IFS=',' read -r -a selected_indices <<<"$selected" selected_indices=()
kernels_to_remove=() IFS=',' read -r -a tokens <<<"$selected"
for token in "${tokens[@]}"; do
if [[ "$token" =~ ^([0-9]+)-([0-9]+)$ ]]; then
for ((i = BASH_REMATCH[1]; i <= BASH_REMATCH[2]; i++)); do
selected_indices+=("$i")
done
else
selected_indices+=("$token")
fi
done
kernels_to_remove=()
for index in "${selected_indices[@]}"; do for index in "${selected_indices[@]}"; do
kernel=$(echo "$available_kernels" | sed -n "${index}p") kernel=$(echo "$available_kernels" | sed -n "${index}p")
if [ -n "$kernel" ]; then if [ -n "$kernel" ]; then