#! /bin/sh prog_dir=`dirname "$0"` for d in `"$prog_dir"/ls-dirty` do echo "----- $d -----" && cd "$d" && git status || exit 1 done