Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
feat: running modules from files
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Aug 13, 2023
1 parent 057b45a commit d0c6dee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,12 @@ for MODULE in "${MODULES[@]}"; do
if [[ "$TYPE" != "null" ]]; then
echo "Launching module of type: $TYPE"
bash "$MODULE_DIRECTORY/$TYPE/$TYPE.sh" "$MODULE"
else
FILE=$(echo "$MODULE" | yq '.from-file')
MODULE_CONFIG=$(yq -o=j -I=0 '.' "$CONFIG_DIRECTORY/$FILE")

TYPE=$(echo "$MODULE_CONFIG" | yq '.type')
echo "Launching module of type: $TYPE"
bash "$MODULE_DIRECTORY/$TYPE/$TYPE.sh" "$MODULE_CONFIG"
fi
done

0 comments on commit d0c6dee

Please sign in to comment.