Skip to content

Commit b3946ae

Browse files
committed
in boids: the run-all script can be used in dry mode
also the artefacts have changed but not sure why exactly
1 parent 6c0c1d6 commit b3946ae

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

notebooks/tps/boids/.teacher/run-all.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
DRY_RUN=""
4+
35
# find the current folder name without the teacher part
46

57
function find-stem() {
@@ -49,7 +51,7 @@ function run-one() {
4951
echo ========== "$current "
5052
extract-docstring $current
5153
# python $current "$@" 2>&1 | grep -v 'Warning: Expected'
52-
python $current
54+
[[ -z "$DRY_RUN" ]] && python $current
5355
}
5456

5557
function run-all() {
@@ -61,6 +63,14 @@ function run-all() {
6163
}
6264

6365
function main() {
66+
while getopts "n" opt; do
67+
case $opt in
68+
n) DRY_RUN="yes";;
69+
*) echo "Unknown option: $opt";;
70+
esac
71+
done
72+
shift $((OPTIND-1))
73+
6474
if [[ -z "$@" ]]; then
6575
run-all
6676
else
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)