-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·33 lines (30 loc) · 827 Bytes
/
run.sh
File metadata and controls
executable file
·33 lines (30 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Generate all meshes in the repository.
#
# Usage:
# ./run.sh # default size factor
# ./run.sh 0.5 # finer meshes
# ./run.sh 2 # coarser meshes
#
# Cascades into each subdirectory that has a run.sh.
SIZE_FACTOR=${1:-1}
DIR="$(cd "$(dirname "$0")" && pwd)"
FAILED=0
for sub in "$DIR"/*/; do
name=$(basename "$sub")
[ "$name" = "old" ] && continue
if [ -f "$sub/run.sh" ]; then
echo ""
echo "========================================"
echo " $name"
echo "========================================"
(cd "$sub" && bash run.sh "$SIZE_FACTOR") || FAILED=$((FAILED + 1))
fi
done
echo ""
if [ $FAILED -eq 0 ]; then
echo "All meshes generated successfully."
else
echo "$FAILED directory(ies) had errors."
exit 1
fi