Explicitly check each exclusion in array instead of relying on implicit concatenation.
Add -d to docker compose up Add --remove-orphans to docker compose down
This commit is contained in:
@@ -9,14 +9,16 @@ do
|
|||||||
folder=$(basename "$dir")
|
folder=$(basename "$dir")
|
||||||
|
|
||||||
# Skip if folder is in the exclusions array
|
# Skip if folder is in the exclusions array
|
||||||
if [[ " ${exclusions[@]} " =~ " $folder " ]]; then
|
for exclusion in "${exclusions[@]}"; do
|
||||||
continue
|
if [[ "$folder" = "$exclusion" ]]; then
|
||||||
|
continue 2
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
cd "$dir" || {
|
cd "$dir" || {
|
||||||
echo "Failed to enter directory: $dir"
|
echo "Failed to enter directory: $dir"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
docker compose up
|
docker compose up -d
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -9,14 +9,16 @@ do
|
|||||||
folder=$(basename "$dir")
|
folder=$(basename "$dir")
|
||||||
|
|
||||||
# Skip if folder is in the exclusions array
|
# Skip if folder is in the exclusions array
|
||||||
if [[ " ${exclusions[@]} " =~ " $folder " ]]; then
|
for exclusion in "${exclusions[@]}"; do
|
||||||
continue
|
if [[ "$folder" = "$exclusion" ]]; then
|
||||||
|
continue 2
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
cd "$dir" || {
|
cd "$dir" || {
|
||||||
echo "Failed to enter directory: $dir"
|
echo "Failed to enter directory: $dir"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
docker compose down
|
docker compose down --remove-orphans
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user