check number of arguments

This commit is contained in:
Ward Wouts 2002-12-22 18:49:00 +00:00
parent ef29f33b86
commit f5a17a5a5d

View file

@ -8,6 +8,10 @@ die() { echo "$*" >&2; exit 1; }
export LOCKFILE=${HOME}/.cvsup/$1_lock
export DATEFILE=${HOME}/.cvsup/$1_date
if ( [ ${#} -ne 2 ] ); then
die "Usage: cvsup <tree> <branch>\n"
fi
if ( [ -e $LOCKFILE ]); then
LOCKPID=`cat $LOCKFILE`
if ( ! ps -p $LOCKPID|egrep -q "$LOCKPID" ); then