#!/bin/sh if [ "$ARCH"x = ""x ]; then echo "ARCH not set, aborting" exit 1 fi for LOGFILE in $@; do case $LOGFILE in *.log) # OK ;; *) echo "ERROR: non-logfile $LOGFILE specified" echo "ABORT" exit 1 ;; esac if [ -f $LOGFILE ]; then NOTEFILE=$(echo $LOGFILE | sed 's/\.log$/.note/') echo "Never built on $ARCH anyway" > $NOTEFILE else echo "Can't find logfile $LOGFILE, ignoring" fi done