Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: webapp.eclass
Date: Fri, 22 Feb 2008 13:53:42
Message-Id: E1JSYLK-0003fb-Q9@stork.gentoo.org
1 hollow 08/02/22 13:53:38
2
3 Modified: webapp.eclass
4 Log:
5 replace sed and [] calls with bash expansion
6
7 Revision Changes Path
8 1.52 eclass/webapp.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?rev=1.52&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?rev=1.52&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/webapp.eclass?r1=1.51&r2=1.52
13
14 Index: webapp.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v
17 retrieving revision 1.51
18 retrieving revision 1.52
19 diff -u -r1.51 -r1.52
20 --- webapp.eclass 22 Feb 2008 13:44:41 -0000 1.51
21 +++ webapp.eclass 22 Feb 2008 13:53:38 -0000 1.52
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2006 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.51 2008/02/22 13:44:41 hollow Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.52 2008/02/22 13:53:38 hollow Exp $
27 #
28 # @ECLASS: webapp.eclass
29 # @MAINTAINER:
30 @@ -48,9 +48,7 @@
31 webapp_checkfileexists() {
32 debug-print-function $FUNCNAME $*
33
34 - local my_prefix
35 -
36 - [ -n "${2}" ] && my_prefix="${2}/" || my_prefix=
37 + local my_prefix=${2:+${2}/}
38
39 if [ ! -e "${my_prefix}${1}" ]; then
40 msg="ebuild fault: file '${1}' not found"
41 @@ -67,17 +65,17 @@
42
43 webapp_strip_appdir() {
44 debug-print-function $FUNCNAME $*
45 - echo "${1}" | sed -e "s|${MY_APPDIR}/||g;"
46 + echo "${1#${MY_APPDIR}/}"
47 }
48
49 webapp_strip_d() {
50 debug-print-function $FUNCNAME $*
51 - echo "${1}" | sed -e "s|${D}||g;"
52 + echo "${1#${D}}"
53 }
54
55 webapp_strip_cwd() {
56 debug-print-function $FUNCNAME $*
57 - echo "${1}" | sed -e 's|/./|/|g;'
58 + echo "${1/#.\///}"
59 }
60
61 webapp_getinstalltype() {
62 @@ -231,12 +229,7 @@
63 # do NOT change the naming convention used here without changing all
64 # the other scripts that also rely upon these names
65
66 - local my_file
67 - if [ -z "${3}" ]; then
68 - my_file="${1}-$(basename "${2}")"
69 - else
70 - my_file="${1}-${3}"
71 - fi
72 + local my_file="${1}-${3:-$(basename "${2}")}"
73
74 elog "(${1}) config file '${my_file}'"
75 cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}"
76
77
78
79 --
80 gentoo-commits@l.g.o mailing list