mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
move parameter count check after check for help and version.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
This commit is contained in:
parent
95720106bb
commit
a73e9a24af
@ -78,11 +78,6 @@ check_force () {
|
|||||||
|
|
||||||
# PROGRAM START
|
# PROGRAM START
|
||||||
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "-h" -o "$1" = "--help" ]; then
|
if [ "$1" = "-h" -o "$1" = "--help" ]; then
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
@ -93,6 +88,11 @@ if [ "$1" = "-V" -o "$1" = "--version" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# source system and user makepkg.conf
|
# source system and user makepkg.conf
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r /etc/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source /etc/makepkg.conf
|
||||||
|
@ -62,11 +62,6 @@ version() {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
MAKEPKG_OPTS=
|
MAKEPKG_OPTS=
|
||||||
for arg in $*; do
|
for arg in $*; do
|
||||||
case $arg in
|
case $arg in
|
||||||
@ -147,6 +142,11 @@ if [ "$dest" = "" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# convert a (possibly) relative path to absolute
|
# convert a (possibly) relative path to absolute
|
||||||
cd "$dest"
|
cd "$dest"
|
||||||
dest="$(pwd)"
|
dest="$(pwd)"
|
||||||
|
Loading…
Reference in New Issue
Block a user