mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-24 19:18:04 +00:00
Stop generating header filenames with a newline in them (#17435)
generate-app-headers.sh read APP with a plain grep -oP, so a script that
sets APP twice yielded both lines and the filename became
"almalinux
almalinux${var_version}vm". Three of those are in the tree
and they make main impossible to check out on Windows.
Nothing reads vm/headers: get_header fetches banners from the core
repo, which already carries clean almalinux, debian and ubuntu.
This commit is contained in:
+3
-1
@@ -22,7 +22,9 @@ generate_headers() {
|
||||
for script in "${file_list[@]}"; do
|
||||
[[ -f "$script" ]] || continue
|
||||
|
||||
app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
||||
# -m1: a script that sets APP twice (the second carrying ${var_version})
|
||||
# otherwise yields both lines, and the filename gets a newline in it.
|
||||
app_name=$(grep -m1 -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
||||
if [[ -n "$app_name" ]]; then
|
||||
# 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.
|
||||
|
||||
Reference in New Issue
Block a user