(minor) solaris doesn't like "shift" when there are no arguments remaining
This commit is contained in:
parent
55d64752ae
commit
2907561529
|
@ -45,11 +45,12 @@ die() { echo "$@" >&2; exit 1; }
|
||||||
usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; }
|
usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; }
|
||||||
[ -z "$1" ] && usage
|
[ -z "$1" ] && usage
|
||||||
[ "$1" = "-h" ] && usage
|
[ "$1" = "-h" ] && usage
|
||||||
|
[ "$1" != "list-trash" ] && [ -z "$2" ] && usage
|
||||||
[ -z "$GL_USER" ] && die GL_USER not set
|
[ -z "$GL_USER" ] && die GL_USER not set
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
cmd=$1; shift
|
cmd=$1
|
||||||
repo=$1; shift # may not be present for 'list-trash' command
|
repo=$2
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
RB=`gitolite query-rc GL_REPO_BASE`; cd $RB
|
RB=`gitolite query-rc GL_REPO_BASE`; cd $RB
|
||||||
TRASH_CAN=`gitolite query-rc TRASH_CAN`; tcan=Trash; TRASH_CAN=${TRASH_CAN:-$tcan}
|
TRASH_CAN=`gitolite query-rc TRASH_CAN`; tcan=Trash; TRASH_CAN=${TRASH_CAN:-$tcan}
|
||||||
|
|
Loading…
Reference in a new issue