summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-21 02:46:41 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-21 02:46:41 +0000
commit58cf53efaf4d3d37ea429443b59f646e4d4bf124 (patch)
treeda1d3544d199634bea316118651fb7d7e45aaa0f /eclass/portability.eclass
parentMove libexec dir from /usr/libexec to /usr/lib/misc. (diff)
downloadgentoo-2-58cf53efaf4d3d37ea429443b59f646e4d4bf124.tar.gz
gentoo-2-58cf53efaf4d3d37ea429443b59f646e4d4bf124.tar.bz2
gentoo-2-58cf53efaf4d3d37ea429443b59f646e4d4bf124.zip
touchup syntax so the code is easier to read
Diffstat (limited to 'eclass/portability.eclass')
-rw-r--r--eclass/portability.eclass28
1 files changed, 7 insertions, 21 deletions
diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index 3af218eb7f34..f093e962b9b6 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.2 2005/09/20 13:13:42 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.3 2005/09/21 02:46:41 vapier Exp $
#
# Author: Diego Pettenò <flameeyes@gentoo.org>
#
@@ -28,30 +28,16 @@ treecopy() {
#
# compatibility function that mimes seq command if not available
seq() {
- local p
- p=$(type -P seq)
+ local p=$(type -P seq)
case $# in
- 1)
- min=1
- max=$1
- step=1
- ;;
- 2)
- min=$1
- max=$2
- step=1
- ;;
- 3)
- min=$1
- max=$3
- step=$2
- ;;
- *)
- die "seq called with wrong parameters number"
+ 1) min=1 max=$1 step=1 ;;
+ 2) min=$1 max=$2 step=1 ;;
+ 3) min=$1 max=$3 step=$2 ;;
+ *) die "seq called with wrong number of arguments" ;;
esac
- if [[ -z "${p}" ]]; then
+ if [[ -z ${p} ]] ; then
local reps
# BSD userland
if [[ ${step} != 0 ]]; then