particle-os-modules/modules/fonts/fonts.sh
Nick Saika 17bacbe3da
fix: Fix flag ordering in set calls in scripts (#99)
The README for scripts has an incorrect use of the `set`. Where it says
to use:

	set -oue pipefail

it should be:

	set -euo pipefail

since `pipefail` is an option consumed by `set -o`.

More information: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
2024-01-16 06:12:08 +00:00

16 lines
No EOL
343 B
Bash

#!/usr/bin/env bash
set -euo pipefail
export FONTS_MODULE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
for source in "$FONTS_MODULE_DIR"/sources/*.sh; do
chmod +x "$source"
filename=$(basename -- "$source")
get_yaml_array FONTS ".fonts.${filename%.*}[]" "$1"
bash "$source" "${FONTS[@]}"
done