-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(scripts): Migrate module name from
script
to scripts
- Loading branch information
1 parent
bd1ff5d
commit 1666a45
Showing
5 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
`script.sh` should mimic `scripts.sh` code, in order to retain compatibility with existing custom image users which use `script` as a module name instead of new `scripts` module name. | ||
|
||
This is done in order to standardize module naming convention better. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Tell build process to exit if there are any errors. | ||
set -euo pipefail | ||
|
||
get_yaml_array SCRIPTS '.scripts[]' "$1" | ||
get_yaml_array SNIPPETS '.snippets[]' "$1" | ||
|
||
cd "$CONFIG_DIRECTORY/scripts" | ||
# Make every script executable | ||
find "$PWD" -type f -exec chmod +x {} \; | ||
for SCRIPT in "${SCRIPTS[@]}"; do | ||
echo "Running script $SCRIPT" | ||
"$PWD/$SCRIPT" | ||
done | ||
|
||
for SNIPPET in "${SNIPPETS[@]}"; do | ||
echo "Running snippet $SNIPPET" | ||
bash -c "$SNIPPET" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters