From c78391753bd50910ab19b7876391a06bcfacf1d5 Mon Sep 17 00:00:00 2001 From: librelad Date: Mon, 25 May 2026 18:10:42 +0100 Subject: [PATCH] fix(release): exclude scripts/release/ from sourced arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding scripts/release/ made generate_arrays emit files_release.sh, which would source the build tool make_release.sh at runtime (it runs git archive at load — wrong + harmful). Skip release/ in the folder scan (like system/ and unused/), remove the orphaned files_release.sh, and regenerate the meta-list. fetch.sh stays sourced; make_release is in no array. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- scripts/source/files/arrays/files_release.sh | 9 --------- scripts/source/files/arrays/files_source.sh | 1 - scripts/source/files/generate_arrays.sh | 6 +++--- 3 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 scripts/source/files/arrays/files_release.sh diff --git a/scripts/source/files/arrays/files_release.sh b/scripts/source/files/arrays/files_release.sh deleted file mode 100644 index fab1575..0000000 --- a/scripts/source/files/arrays/files_release.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# This file is auto-generated by generate_arrays.sh -# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate - -release_scripts=( - "release/make_release.sh" - -) diff --git a/scripts/source/files/arrays/files_source.sh b/scripts/source/files/arrays/files_source.sh index d47f033..8c12d51 100755 --- a/scripts/source/files/arrays/files_source.sh +++ b/scripts/source/files/arrays/files_source.sh @@ -22,7 +22,6 @@ source_scripts=( "source/files/arrays/files_migrate.sh" "source/files/arrays/files_network.sh" "source/files/arrays/files_os.sh" - "source/files/arrays/files_release.sh" "source/files/arrays/files_restore.sh" "source/files/arrays/files_setup.sh" "source/files/arrays/files_source.sh" diff --git a/scripts/source/files/generate_arrays.sh b/scripts/source/files/generate_arrays.sh index 11136d9..9f05125 100755 --- a/scripts/source/files/generate_arrays.sh +++ b/scripts/source/files/generate_arrays.sh @@ -66,9 +66,9 @@ for folder in "$SCRIPTS_DIR"/*; do folder_name=$(basename "$folder") # Skip folders that aren't sourced function libraries: the dead-code - # graveyard, and system/ (standalone root-owned helpers installed to - # /usr/local/sbin and invoked via sudo — never sourced into the runtime). - if [ "$folder_name" = "unused" ] || [ "$folder_name" = "system" ]; then + # graveyard; system/ (standalone root-owned helpers invoked via sudo); and + # release/ (build tooling — make_release.sh runs at build time, never sourced). + if [ "$folder_name" = "unused" ] || [ "$folder_name" = "system" ] || [ "$folder_name" = "release" ]; then isNotice "Skipping $folder_name/" continue fi