From 290756152921d1dba754feebfb06485a4dc4c9c9 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 22 May 2012 13:15:54 +0530 Subject: [PATCH] (minor) solaris doesn't like "shift" when there are no arguments remaining --- src/commands/D | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/D b/src/commands/D index 11bff3c..2d96964 100755 --- a/src/commands/D +++ b/src/commands/D @@ -45,11 +45,12 @@ die() { echo "$@" >&2; exit 1; } usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; } [ -z "$1" ] && usage [ "$1" = "-h" ] && usage +[ "$1" != "list-trash" ] && [ -z "$2" ] && usage [ -z "$GL_USER" ] && die GL_USER not set # ---------------------------------------------------------------------- -cmd=$1; shift -repo=$1; shift # may not be present for 'list-trash' command +cmd=$1 +repo=$2 # ---------------------------------------------------------------------- RB=`gitolite query-rc GL_REPO_BASE`; cd $RB TRASH_CAN=`gitolite query-rc TRASH_CAN`; tcan=Trash; TRASH_CAN=${TRASH_CAN:-$tcan}