mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-25 06:25:04 +00:00
feat: add function for reading individual YAML strings
The recipe file is now also moved to a separate variable, and we use `--` to ensure that yq never misinterprets any custom arguments as `-flags`.
This commit is contained in:
6
build.sh
6
build.sh
@@ -4,8 +4,12 @@
|
|||||||
set -oue pipefail
|
set -oue pipefail
|
||||||
|
|
||||||
# Helper functions.
|
# Helper functions.
|
||||||
|
RECIPE_FILE="/usr/etc/ublue-recipe.yml"
|
||||||
get_yaml_array() {
|
get_yaml_array() {
|
||||||
mapfile -t "$1" < <(yq "$2" < /usr/etc/ublue-recipe.yml)
|
mapfile -t "$1" < <(yq -- "$2" "$RECIPE_FILE")
|
||||||
|
}
|
||||||
|
get_yaml_string() {
|
||||||
|
yq -- "$1" "$RECIPE_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add custom repos.
|
# Add custom repos.
|
||||||
|
|||||||
Reference in New Issue
Block a user