#!/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