feat: add configurable COMMUNITY_SCRIPTS_URL for dev sourcing (#1449)

- Replace all hardcoded source URLs with $COMMUNITY_SCRIPTS_URL variable
- Default: https://git.community-scripts.org/.../ProxmoxVED/raw/branch/main
- Override: export COMMUNITY_SCRIPTS_URL=https://.../your-fork/raw/branch/xyz
- Propagates into container via build.func exports
- Updated: 43 ct scripts, 14 deferred, 22 vm scripts, 5 func files
- Document in docs/DEV_MODE.md with usage examples
- Also normalizes legacy GitHub URLs to Gitea canonical URL
This commit is contained in:
MickLesk
2026-02-22 14:36:23 +01:00
parent 719473f522
commit 4b9121f41c
84 changed files with 137 additions and 105 deletions

View File

@@ -172,9 +172,12 @@ _bootstrap() {
fi
fi
# Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main}"
# Source core functions
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func)
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/core.func")
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/error_handler.func")
load_functions
catch_errors
@@ -744,10 +747,10 @@ EOF
# Source appropriate tools.func based on OS
case "$OS_FAMILY" in
alpine)
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-tools.func)
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/alpine-tools.func")
;;
*)
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func)
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/tools.func")
;;
esac
}