#!/bin/sh TTY=`tty` OUTPUT=${OUTPUT:-$TTY} echo "$OUTPUT" | grep -i "not a tty" if [ $? = 0 ] ; then OUTPUT=tty.output fi echo "Building $*" >>$OUTPUT 2>&1 make $1 >>$OUTPUT 2>&1