summaryrefslogtreecommitdiff
path: root/run
blob: 83201589259cc9958aa05984b8e26f6c02c24c3c (plain)
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
#!/bin/zsh

source util

dry="0"
filter=""
script_dir=${0:a:h}

while [[ $# -gt 0 ]]; do
	if [[ "$1" == "--dry" ]]; then
		dry="1"
	else
		filter="$1"
	fi
	shift
done

log "$script_dir -- $filter"
cd $script_dir
scripts="$(find ./runs -maxdepth 1 -mindepth 1 -perm +111 -type f)"
for script in $scripts; do
	if echo "$script" | grep -qv "$filter"; then
		log "filtering $script"
		continue
	fi
	execute ./$script
done