mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-06 19:05:56 +01:00
refactor: remove inline header_info from addons, use core.func get_header()
- get_header() in core.func now maps APP_TYPE=addon to tools/headers/ path - Removed 5 duplicate ASCII art header_info functions from addon scripts - Addons now use the shared header_info() from core.func + tools/headers/ files
This commit is contained in:
@@ -788,7 +788,9 @@ exit_script() {
|
||||
get_header() {
|
||||
local app_name=$(echo "${APP,,}" | tr -d ' ')
|
||||
local app_type=${APP_TYPE:-ct} # Default to 'ct' if not set
|
||||
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${app_type}/headers/${app_name}"
|
||||
local header_dir="${app_type}"
|
||||
[[ "$app_type" == "addon" ]] && header_dir="tools"
|
||||
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${header_dir}/headers/${app_name}"
|
||||
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
|
||||
|
||||
mkdir -p "$(dirname "$local_header_path")"
|
||||
|
||||
Reference in New Issue
Block a user