From a73e9a24affa79c2d83e849f7f3c2efd12ef41f0 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Wed, 11 Apr 2007 21:51:20 +0100 Subject: move parameter count check after check for help and version. Signed-off-by: Andrew Fyfe --- scripts/gensync.in | 10 +++++----- scripts/makeworld.in | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/gensync.in b/scripts/gensync.in index a8e782fd..7898f286 100755 --- a/scripts/gensync.in +++ b/scripts/gensync.in @@ -78,11 +78,6 @@ check_force () { # PROGRAM START -if [ $# -lt 2 ]; then - usage - exit 1 -fi - if [ "$1" = "-h" -o "$1" = "--help" ]; then usage exit 0 @@ -93,6 +88,11 @@ if [ "$1" = "-V" -o "$1" = "--version" ]; then exit 0 fi +if [ $# -lt 2 ]; then + usage + exit 1 +fi + # source system and user makepkg.conf if [ -r /etc/makepkg.conf ]; then source /etc/makepkg.conf diff --git a/scripts/makeworld.in b/scripts/makeworld.in index acbd2830..8783fc9d 100755 --- a/scripts/makeworld.in +++ b/scripts/makeworld.in @@ -62,11 +62,6 @@ version() { echo } -if [ $# -lt 2 ]; then - usage - exit 1 -fi - MAKEPKG_OPTS= for arg in $*; do case $arg in @@ -147,6 +142,11 @@ if [ "$dest" = "" ]; then exit 1 fi +if [ $# -lt 1 ]; then + usage + exit 1 +fi + # convert a (possibly) relative path to absolute cd "$dest" dest="$(pwd)" -- cgit v1.2.3-70-g09d2