#!/bin/sh set -ev rm -rf $0.dir mkdir $0.dir cd $0.dir cat > top.fac < foo > foo EOF cat > script.sh < input git init git add top.fac input script.sh ${FAC:-../../fac} grep foo foo grep input top.fac.tum echo bars > input ${FAC:-../../fac} grep bar foo cat > script.sh < input2 ${FAC:-../../fac} grep baz foo exit 0