#!/bin/sh
#
# openall -- open all files named (useful because open only takes 1 argument)
#

[ -n "$echo" ] && set -x

USAGE='openall [file] ...'

# no arguments?
if test $# -eq 0
then
	echo "$USAGE" >&2
	exit 1
fi

# no options allowed
case "$1" in
-*)
	echo "$USAGE" >&2
	exit 2
	;;
esac

OPEN='/usr/bin/open'

if test -f '/bin/cygstart'
then
    OPEN='/bin/cygstart'
fi

for f in "$@"
do
    "$OPEN" "$f"
done
