mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 09:54:36 +00:00
Switch from workflows to scripts folder
This commit is contained in:
parent
d20d0428dc
commit
d3b0becfe6
3 changed files with 2 additions and 2 deletions
33
.github/workflows/scripts/generate-app-headers.sh
vendored
Normal file
33
.github/workflows/scripts/generate-app-headers.sh
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
output_file="./misc/.app-headers"
|
||||
> "$output_file" # Clear or create the file
|
||||
|
||||
current_date=$(date +"%m-%d-%Y")
|
||||
# Header with date
|
||||
{
|
||||
echo "### Generated on $current_date"
|
||||
echo "##################################################"
|
||||
echo
|
||||
} >> "$output_file"
|
||||
|
||||
# Find only regular .sh files in ./ct, sort them alphabetically
|
||||
find ./ct -type f -name "*.sh" | sort | while read -r script; do
|
||||
# Extract the APP name from the APP line
|
||||
app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
||||
|
||||
if [[ -n "$app_name" ]]; then
|
||||
# Generate figlet output
|
||||
figlet_output=$(figlet -f slant "$app_name")
|
||||
{
|
||||
echo "### $(basename "$script")"
|
||||
echo "APP=$app_name"
|
||||
echo "$figlet_output"
|
||||
echo
|
||||
} >> "$output_file"
|
||||
else
|
||||
echo "No APP name found in $script, skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Generated combined file at $output_file"
|
Loading…
Add table
Add a link
Reference in a new issue