From 7723269bbc3a8c49a5a2d1c0a53bff0412f1ad1a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:47:51 +0100 Subject: [PATCH] Update generate-app-headers.sh --- .github/workflows/scripts/generate-app-headers.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/generate-app-headers.sh b/.github/workflows/scripts/generate-app-headers.sh index e0811495..812ceb2e 100755 --- a/.github/workflows/scripts/generate-app-headers.sh +++ b/.github/workflows/scripts/generate-app-headers.sh @@ -1,13 +1,19 @@ #!/usr/bin/env bash +# Base directory for headers +headers_dir="./ct/headers" + +# Ensure the headers directory exists +mkdir -p "$headers_dir" + # Find all .sh files in ./ct directory, sorted 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 - # Define the output file name based on the .sh file - output_file="${script%.sh}.app" + # Define the output file name in the headers directory + output_file="${headers_dir}/$(basename "${script%.*}")" # Check if the output file already exists if [[ ! -f "$output_file" ]]; then