summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier>2014-06-13 22:03:23 +0000
committervapier <vapier>2014-06-13 22:03:23 +0000
commit0f3b9a04126b24c6dc9d7074d57149e8ce99ea80 (patch)
treeb7c5623052737ab5ea4fd0fbba3ff12271c34f90 /locale-gen
parentadd prefix support #473484 by Benda Xu (diff)
downloadlocale-gen-0f3b9a04126b24c6dc9d7074d57149e8ce99ea80.tar.gz
locale-gen-0f3b9a04126b24c6dc9d7074d57149e8ce99ea80.tar.bz2
locale-gen-0f3b9a04126b24c6dc9d7074d57149e8ce99ea80.zip
locale-gen: use $# when processing positional args
Diffstat (limited to 'locale-gen')
-rwxr-xr-xlocale-gen6
1 files changed, 3 insertions, 3 deletions
diff --git a/locale-gen b/locale-gen
index 38b05fe..7d142a2 100755
--- a/locale-gen
+++ b/locale-gen
@@ -44,14 +44,14 @@ show_usage() {
For more info, see the ${HILITE}locale-gen${NORMAL}(1) and ${HILITE}locale.gen${NORMAL}(8) manpages.
EOF
- [[ -z $@ ]] && exit 0
+ [[ $# -eq 0 ]] && exit 0
echo ""
eerror "Unknown option '$1'"
exit 1
}
show_version() {
local b="(" a=")"
- local cvsver="$Revision: 1.33 $b $Date: 2013/07/01 00:32:15 $a"
+ local cvsver="$Revision: 1.34 $b $Date: 2014/06/13 22:03:23 $a"
echo "locale-gen-${cvsver//: }"
exit 0
}
@@ -71,7 +71,7 @@ JOBS_MAX=1
QUIET=0
SET_X=""
LOCALE_ARCHIVE=true
-while [[ -n $1 ]] ; do
+while [[ $# -gt 0 ]] ; do
case $1 in
-k|--keep|--keep-existing) KEEP=$1;;
-d|--destdir) shift; DESTDIR=$1; unset ROOT;;