Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] eselect r481 - in trunk: . libs
Date: Mon, 20 Apr 2009 21:16:28
Message-Id: E1Lw0qo-0007FP-O3@stork.gentoo.org
1 Author: ulm
2 Date: 2009-04-20 21:16:26 +0000 (Mon, 20 Apr 2009)
3 New Revision: 481
4
5 Modified:
6 trunk/ChangeLog
7 trunk/libs/tests.bash.in
8 Log:
9 Fix expansion of positional parameters in has().
10
11 Modified: trunk/ChangeLog
12 ===================================================================
13 --- trunk/ChangeLog 2009-04-20 20:07:29 UTC (rev 480)
14 +++ trunk/ChangeLog 2009-04-20 21:16:26 UTC (rev 481)
15 @@ -1,5 +1,8 @@
16 2009-04-20 Ulrich Mueller <ulm@g.o>
17
18 + * libs/tests.bash.in (has): Quote $@ in order to expand positional
19 + parameters correctly.
20 +
21 * modules/rc.eselect (source_rc_functions, get_runlevel):
22 New functions for OpenRC (and baselayout-1) support.
23 (RC_SVCDIR, rc_svcdir): Removed.
24
25 Modified: trunk/libs/tests.bash.in
26 ===================================================================
27 --- trunk/libs/tests.bash.in 2009-04-20 20:07:29 UTC (rev 480)
28 +++ trunk/libs/tests.bash.in 2009-04-20 21:16:26 UTC (rev 481)
29 @@ -1,6 +1,6 @@
30 #!/bin/bash
31
32 -# Copyright (c) 2005 Gentoo Foundation.
33 +# Copyright (c) 2005-2009 Gentoo Foundation.
34 # $Id$
35 # This file is part of the 'eselect' tools framework.
36 #
37 @@ -21,7 +21,7 @@
38 has() {
39 local test=${1} item
40 shift
41 - for item in $@ ; do
42 + for item in "$@" ; do
43 [[ ${item} == ${test} ]] && return 0
44 done
45 return 1
46 @@ -40,4 +40,3 @@
47 }
48
49 # vim: set sw=4 et sts=4 tw=80 :
50 -