#! /bin/sh # # draw maze and solution # case "$#" in 1) name=$(dirname "$1")/$(basename "$1" .txt);; *) echo "Usage: ${0} name" 1>&2; exit 1;; esac echo "creating $name.gif and $name-solve.gif" ./draw -g < "$name.txt" | ./mazeplot.sh > "$name.gif" ./draw -g -s < "$name.txt" > "$name-solve.txt" ./draw -g < "$name.txt" | ./solveplot.sh "$name-solve.txt" > "$name-solve.gif" rm -f "$name-solve.txt"