#!/bin/sh set -ev rm -rf $0.dir mkdir $0.dir cd $0.dir echo hello > input_file mkdir repo cd repo cat > top.fac < foobar < script.sh > foobar EOF cat > script.sh < ../new_input_file if ${FAC:-../../../fac}; then echo this should have failed exit 1 fi cat > script.sh <