mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-05 12:23:25 +02:00
Refactor: harmonize tools/addon and move boilerplate into core.func (#16202)
This commit is contained in:
committed by
GitHub
parent
e489c7f00b
commit
86d67affa3
+2
@@ -6,6 +6,8 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- "ct/**.sh"
|
||||
- "tools/**.sh"
|
||||
- "vm/**.sh"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
+3
-1
@@ -24,7 +24,9 @@ generate_headers() {
|
||||
|
||||
app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
||||
if [[ -n "$app_name" ]]; then
|
||||
output_file="${headers_dir}/$(basename "${script%.*}")"
|
||||
# core.func/vm-core.func look the header up as "${APP,,}" without spaces,
|
||||
# so the generated file has to be named after APP - not after the script.
|
||||
output_file="${headers_dir}/$(echo "${app_name,,}" | tr -d ' ')"
|
||||
figlet_output=$(figlet -w 500 -f slant "$app_name")
|
||||
if [[ -n "$figlet_output" ]]; then
|
||||
echo "$figlet_output" >"$output_file"
|
||||
|
||||
Reference in New Issue
Block a user