[PR #1211] [CLOSED] Implement overridable URL for scripts #2929

Closed
opened 2026-02-05 05:20:49 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/1211
Author: @cricalix
Created: 1/3/2025
Status: Closed

Base: developHead: relocatable-url


📝 Commits (9)

📊 Changes

201 files changed (+669 additions, -319 deletions)

View changed files

📝 ct/actualbudget.sh (+3 -1)
📝 ct/adguard.sh (+3 -1)
📝 ct/adventurelog.sh (+3 -1)
📝 ct/agentdvr.sh (+3 -1)
📝 ct/alpine-docker.sh (+3 -1)
📝 ct/alpine-grafana.sh (+3 -1)
📝 ct/alpine-nextcloud.sh (+3 -1)
📝 ct/alpine-vaultwarden.sh (+3 -1)
📝 ct/alpine-zigbee2mqtt.sh (+3 -1)
📝 ct/alpine.sh (+3 -1)
📝 ct/apache-cassandra.sh (+3 -1)
📝 ct/apache-couchdb.sh (+3 -1)
📝 ct/apache-guacamole.sh (+3 -1)
📝 ct/apt-cacher-ng.sh (+3 -1)
📝 ct/archivebox.sh (+3 -1)
📝 ct/aria2.sh (+3 -1)
📝 ct/audiobookshelf.sh (+3 -1)
📝 ct/authentik.sh (+3 -1)
📝 ct/autobrr.sh (+3 -1)
📝 ct/bazarr.sh (+3 -1)

...and 80 more files

📄 Description

🛠️ Note:
We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal!
🎮 Note for game-related scripts: These have a lower likelihood of being merged.


✍️ Description

In #1202, I proposed that it would be beneficial to support a mechanism that allows changing the URL sourced by the ct/*.sh scripts through an environment variable. This PR shows a basic implementation that is as yet not fully tested; in principle it works, allowing two different overrides at the moment (which may be more complexity than desired).

  1. It's possible to just set BRANCH=whatever to change the branch on github for the entry point ct script. This propagates into CSCRIPTS_BASE_URL, which propagates into build.func.

  2. It's possible to set CSCRIPTS_BASE_URL=some_url_containing_misc_install_ct_etc, ignoring BRANCH. The override propagates the same way.

The BRANCH bit came about because of me noticing that cloning the develop branch broke my sed commands to implement the PR. It would be simpler in a lot of respects to drop that variable, and just mutate the CSCRIPTS_BASE_URL value when making the develop branch (I presume it's automation).

This PR was implemented with essentially the following shell commands:

  • rg -sl 'curl -s' | xargs sed -i -e '/ProxmoxVE\/develop/ i: "${BRANCH:=develop}"' -e '/ProxmoxVE\/develop\/misc/ i: "${CSCRIPTS_BASE_URL:=https://raw.githubusercontent.com/community-scripts/ProxmoxVE/${BRANCH}}"' -e 's%https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/misc/build.func%"${CSCRIPTS_BASE_URL}/misc/build.func"%'

Plus manual edits on build.func. I cross-checked with some rg usage that the other occurrences of ProxmoxVE/develop were in Markdown files or image URLs.


Please remove unneeded lines!

  • Related Discussion: #1202

🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)

From the linked discussion

~/Source/ProxmoxVE$ CSCRIPTS_BASE_URL=file://$HOME/Source/ProxmoxVE bash ct/lidarr.sh
FIGlet or the slant font is missing. Installing...
Unsupported operating system.
Using file:///home/cricalix/Source/ProxmoxVE as source of truth
  🖥  Operating System: debian
  🌟  Version: 12
  📦  Container Type: Unprivileged (WOOHOO)
  💾  Disk Size: 4GB
  🧠  CPU Cores: 2
  🛠  RAM Size: 1024MB
  🆔  Container ID: 
  🚀  Creating a Lidarr LXC using the above default settings

Aong the way, I changed the URL in the apache-guacamole script; it's different from the rest and is now aligned.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/1211 **Author:** [@cricalix](https://github.com/cricalix) **Created:** 1/3/2025 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `relocatable-url` --- ### 📝 Commits (9) - [`8fed3ba`](https://github.com/community-scripts/ProxmoxVE/commit/8fed3ba0c02d77a930db88d00028c0a1062c3527) Implement overridable URL for scripts #1202 - [`23f89fa`](https://github.com/community-scripts/ProxmoxVE/commit/23f89faf0f9ecbe54a99b4c325016bfe7af46bb0) Update zigbee2mqtt.sh - [`a4e2f37`](https://github.com/community-scripts/ProxmoxVE/commit/a4e2f373eaea54d07850a9328aaf50bf042752c6) Update zigbee2mqtt-install.sh - [`714ec3f`](https://github.com/community-scripts/ProxmoxVE/commit/714ec3ffea45c44337e7e8fbad86e55de41684d0) Update build.func - [`52fbc5e`](https://github.com/community-scripts/ProxmoxVE/commit/52fbc5e0939e622fe7042c46ede28e3766f3333f) Update build.func - [`8e382fc`](https://github.com/community-scripts/ProxmoxVE/commit/8e382fc03f216c42b01d1959c9fe5c8ce12c6df0) Update zigbee2mqtt-install.sh - [`36dfd44`](https://github.com/community-scripts/ProxmoxVE/commit/36dfd44ca1ebce2df2e4535979f27c2c51f0e346) Update zigbee2mqtt.sh - [`c5fa9f8`](https://github.com/community-scripts/ProxmoxVE/commit/c5fa9f8b69dfe12959d6bb6112f772deeb71c766) Update zigbee2mqtt-install.sh - [`80f33ab`](https://github.com/community-scripts/ProxmoxVE/commit/80f33abf8f3ded3a588ee00adc77ddf342e8b9d8) Update zigbee2mqtt.sh ### 📊 Changes **201 files changed** (+669 additions, -319 deletions) <details> <summary>View changed files</summary> 📝 `ct/actualbudget.sh` (+3 -1) 📝 `ct/adguard.sh` (+3 -1) 📝 `ct/adventurelog.sh` (+3 -1) 📝 `ct/agentdvr.sh` (+3 -1) 📝 `ct/alpine-docker.sh` (+3 -1) 📝 `ct/alpine-grafana.sh` (+3 -1) 📝 `ct/alpine-nextcloud.sh` (+3 -1) 📝 `ct/alpine-vaultwarden.sh` (+3 -1) 📝 `ct/alpine-zigbee2mqtt.sh` (+3 -1) 📝 `ct/alpine.sh` (+3 -1) 📝 `ct/apache-cassandra.sh` (+3 -1) 📝 `ct/apache-couchdb.sh` (+3 -1) 📝 `ct/apache-guacamole.sh` (+3 -1) 📝 `ct/apt-cacher-ng.sh` (+3 -1) 📝 `ct/archivebox.sh` (+3 -1) 📝 `ct/aria2.sh` (+3 -1) 📝 `ct/audiobookshelf.sh` (+3 -1) 📝 `ct/authentik.sh` (+3 -1) 📝 `ct/autobrr.sh` (+3 -1) 📝 `ct/bazarr.sh` (+3 -1) _...and 80 more files_ </details> ### 📄 Description > **🛠️ Note:** > We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal! > 🎮 **Note for game-related scripts:** These have a lower likelihood of being merged. --- ## ✍️ Description In #1202, I proposed that it would be beneficial to support a mechanism that allows changing the URL sourced by the `ct/*.sh` scripts through an environment variable. This PR shows a basic implementation that is as yet not fully tested; in principle it works, allowing two different overrides at the moment (which may be more complexity than desired). 1) It's possible to just set `BRANCH=whatever` to change the branch on github for the entry point `ct` script. This propagates into `CSCRIPTS_BASE_URL`, which propagates into `build.func`. 2) It's possible to set `CSCRIPTS_BASE_URL=some_url_containing_misc_install_ct_etc`, ignoring `BRANCH`. The override propagates the same way. The `BRANCH` bit came about because of me noticing that cloning the `develop` branch broke my `sed` commands to implement the PR. It would be simpler in a lot of respects to drop that variable, and just mutate the `CSCRIPTS_BASE_URL` value when making the develop branch (I presume it's automation). This PR was implemented with essentially the following shell commands: * `rg -sl 'curl -s' | xargs sed -i -e '/ProxmoxVE\/develop/ i: "${BRANCH:=develop}"' -e '/ProxmoxVE\/develop\/misc/ i: "${CSCRIPTS_BASE_URL:=https://raw.githubusercontent.com/community-scripts/ProxmoxVE/${BRANCH}}"' -e 's%https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/misc/build.func%"${CSCRIPTS_BASE_URL}/misc/build.func"%'` Plus manual edits on build.func. I cross-checked with some `rg` usage that the other occurrences of ProxmoxVE/develop were in Markdown files or image URLs. - - - **_Please remove unneeded lines!_** - Related Discussion: #1202 --- ## 🛠️ Type of Change Please check the relevant options: - [ ] Bug fix (non-breaking change that resolves an issue) - [ ] New feature (non-breaking change that adds functionality) - [X] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts) --- ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [X] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [ ] Testing performed (I have thoroughly tested my changes and verified expected functionality.) - [ ] Documentation updated (I have updated any relevant documentation) --- ## 📋 Additional Information (optional) From the linked discussion ``` ~/Source/ProxmoxVE$ CSCRIPTS_BASE_URL=file://$HOME/Source/ProxmoxVE bash ct/lidarr.sh FIGlet or the slant font is missing. Installing... Unsupported operating system. Using file:///home/cricalix/Source/ProxmoxVE as source of truth 🖥 Operating System: debian 🌟 Version: 12 📦 Container Type: Unprivileged (WOOHOO) 💾 Disk Size: 4GB 🧠 CPU Cores: 2 🛠 RAM Size: 1024MB 🆔 Container ID: 🚀 Creating a Lidarr LXC using the above default settings ``` Aong the way, I changed the URL in the apache-guacamole script; it's different from the rest and is now aligned. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 05:20:49 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#2929