Files
secureblue/modules/script/script.sh
ER dc97fa4201 fix: don't run arbitrary commands with script
* scripts are now called with their absolute paths instead of ./
2023-08-13 18:36:49 +03:00

15 lines
306 B
Bash

#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -oue pipefail
get_yaml_array SCRIPTS '.scripts[]' "$1"
cd "$CONFIG_DIRECTORY/scripts"
find "$PWD" -type f -exec chmod +x {} \;
for SCRIPT in "${SCRIPTS[@]}"; do
echo "Running script $SCRIPT"
eval "$PWD/$SCRIPT"
done