parameterize
This commit is contained in:
@@ -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}")
|
||||||
|
|||||||
Reference in New Issue
Block a user