parameterize

This commit is contained in:
Sebastian
2024-09-24 07:08:03 +02:00
parent 8777dd736b
commit 9e91f100d9

View File

@@ -15,6 +15,19 @@ for part in "${parts[@]}"; do
include=false include=false
fi fi
done done
# Check if any parameters were passed
if [ $# -gt 0 ]; then
# Put parameters into an array (list)
params=("$@")
# Check if a string is part of the list
if [[ " ${params[@]} " =~ " $1 " ]]; then
include=true # don't change anything
else
include=false
fi
fi
if $include; then if $include; then
result=$($BASEPATH/sync-status.sh "${part%.yml}") result=$($BASEPATH/sync-status.sh "${part%.yml}")