From 18d1b3d4cd79f3e2f37759558e8a9d83b7bcc613 Mon Sep 17 00:00:00 2001 From: ER Date: Sun, 13 Aug 2023 16:15:22 +0300 Subject: [PATCH] Revert "refactor: export get_yaml_array" This reverts commit c27685fae21ca767c47c63665a03cae55c47fc13. (get_yaml_array can't be used in modules since it reads from the $RECIPE_FILE) --- build.sh | 1 - modules/script/script.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 3125c8d..29a1798 100644 --- a/build.sh +++ b/build.sh @@ -11,7 +11,6 @@ MODULE_DIRECTORY="/tmp/modules" get_yaml_array() { readarray "$1" < <(yq -o=j -I=0 "$2" "$RECIPE_FILE" ) } -export -f get_yaml_array # Automatically determine which Fedora version we're building. FEDORA_VERSION="$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)" diff --git a/modules/script/script.sh b/modules/script/script.sh index c5ac89f..d71a78a 100644 --- a/modules/script/script.sh +++ b/modules/script/script.sh @@ -3,9 +3,10 @@ # Tell build process to exit if there are any errors. set -oue pipefail +readarray RUN < <(yq -o=j -I=0 '.run[]' "$1" ) + cd "$CONFIG_DIRECTORY/scripts" -get_yaml_array RUN '.run[]' for CMD in "${RUN[@]}"; do echo "Running command: $CMD" $CMD