#!/bin/sh - outfile=.make.err # mak - convenience front-end to make for output logging and backgrounding # Steve Kinzler, kinzler@cs.indiana.edu, Mar 00 # http://www.cs.indiana.edu/~kinzler/home.html#unix iargs=; bg= case "$1" in -f) iargs="$1 $2"; shift; shift;; esac case "$1" in -bg) bg=t; shift;; esac case "$1" in -h) echo "usage: $0 [ -bg ] [ make_args ]" 1>&2; exit 1;; esac case "$bg" in ?*) (make $iargs ${1+"$@"} < /dev/null > "$outfile" 2>&1 case "$?" in 0) echo  | tr -d '\012'; sleep 1; echo  | tr -d '\012';; *) echo  | tr -d '\012';; esac) &;; *) make $iargs ${1+"$@"} 2>&1 | tee "$outfile";; esac