Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/eselect-wxwidgets/files: wxrc-0.5 wx-config-0.5 wxwidgets.eselect-0.5
Date: Wed, 12 Dec 2007 03:29:21
Message-Id: E1J2IHY-0002vK-Ob@stork.gentoo.org
1 dirtyepic 07/12/12 03:29:12
2
3 Modified: wxrc-0.5 wx-config-0.5 wxwidgets.eselect-0.5
4 Log:
5 Output touchups. Handle none profile better.
6 (Portage version: 2.1.4_rc9)
7
8 Revision Changes Path
9 1.2 app-admin/eselect-wxwidgets/files/wxrc-0.5
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxrc-0.5?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxrc-0.5?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxrc-0.5?r1=1.1&r2=1.2
14
15 Index: wxrc-0.5
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxrc-0.5,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- wxrc-0.5 18 Nov 2007 21:21:10 -0000 1.1
22 +++ wxrc-0.5 12 Dec 2007 03:29:12 -0000 1.2
23 @@ -3,4 +3,4 @@
24 # /usr/bin/wxrc
25 # another lame wrapper by dirtyepic@g.o
26
27 -$(/usr/bin/wx-config --utility=wxrc) $@
28 +/usr/bin/wx-config --utility=wxrc "$@"
29
30
31
32 1.2 app-admin/eselect-wxwidgets/files/wx-config-0.5
33
34 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-0.5?rev=1.2&view=markup
35 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-0.5?rev=1.2&content-type=text/plain
36 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-0.5?r1=1.1&r2=1.2
37
38 Index: wx-config-0.5
39 ===================================================================
40 RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wx-config-0.5,v
41 retrieving revision 1.1
42 retrieving revision 1.2
43 diff -u -r1.1 -r1.2
44 --- wx-config-0.5 18 Nov 2007 21:21:10 -0000 1.1
45 +++ wx-config-0.5 12 Dec 2007 03:29:12 -0000 1.2
46 @@ -5,29 +5,31 @@
47 # a lame wx-config wrapper by dirtyepic@g.o
48
49 _wxerror() {
50 + echo "An error occurred while calling wx-config:"
51 echo
52 - echo "Cannot find the currently selected wxWidgets profile."
53 + echo " ${1}"
54 echo
55 echo "Please use \`eselect wxwidgets\` to select an available profile and try again."
56 - echo
57 exit 1
58 }
59
60 if [[ -n ${WX_ECLASS_CONFIG} ]]; then
61 - ${WX_ECLASS_CONFIG} $@
62 + ${WX_ECLASS_CONFIG} "$@"
63 exit 0
64 else
65 if [[ -e /var/lib/wxwidgets/current ]]; then
66 source /var/lib/wxwidgets/current
67 else
68 - _wxerror
69 + _wxerror "Cannot find wxWidgets profile configuration file ( /var/lib/wxwidgets/current )"
70 fi
71
72 + [[ ${WXCONFIG} == none ]] && _wxerror "No profile currently selected"
73 +
74 if [[ -f /usr/lib/wx/config/${WXCONFIG} \
75 && -x /usr/lib/wx/config/${WXCONFIG} ]]; then
76 - /usr/lib/wx/config/${WXCONFIG} $@
77 + /usr/lib/wx/config/${WXCONFIG} "$@"
78 else
79 - _wxerror
80 + _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )"
81 fi
82 exit 0
83 fi
84
85
86
87 1.2 app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5
88
89 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5?rev=1.2&view=markup
90 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5?rev=1.2&content-type=text/plain
91 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5?r1=1.1&r2=1.2
92
93 Index: wxwidgets.eselect-0.5
94 ===================================================================
95 RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v
96 retrieving revision 1.1
97 retrieving revision 1.2
98 diff -u -r1.1 -r1.2
99 --- wxwidgets.eselect-0.5 18 Nov 2007 21:21:10 -0000 1.1
100 +++ wxwidgets.eselect-0.5 12 Dec 2007 03:29:12 -0000 1.2
101 @@ -1,6 +1,6 @@
102 # Copyright 1999-2007 Gentoo Foundation
103 # Distributed under the terms of the GNU General Public License v2
104 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v 1.1 2007/11/18 21:21:10 dirtyepic Exp $
105 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.5,v 1.2 2007/12/12 03:29:12 dirtyepic Exp $
106
107 inherit config
108
109 @@ -34,11 +34,11 @@
110 :
111 else
112 [[ ! -f ${WXCONFDIR}/${target} ]] && \
113 - die -q "\"${1}\" doesn't appear to be a valid profile name."
114 + die -q "\"${1}\" doesn't appear to be a valid profile name"
115 fi
116
117 echo
118 - echo "Setting wxWidgets profile to ${target}."
119 + echo "Setting wxWidgets profile to ${target}"
120 echo
121 store_config ${WXCONFFILE} WXCONFIG ${target}
122 }
123 @@ -46,7 +46,7 @@
124 ### show action ###
125
126 describe_show() {
127 - echo "Show the currently selected profile."
128 + echo "Show the currently selected profile"
129 }
130
131 do_show() {
132 @@ -63,7 +63,7 @@
133 ### list action ###
134
135 describe_list() {
136 - echo "List available profiles."
137 + echo "List available profiles"
138 }
139
140 do_list() {
141 @@ -89,7 +89,7 @@
142 ### set action ###
143
144 describe_set() {
145 - echo "Set the system wxWidgets profile."
146 + echo "Set the system wxWidgets profile"
147 }
148
149 describe_set_options() {
150 @@ -111,30 +111,17 @@
151 }
152
153 describe_update() {
154 - echo "Check the validity of the current profile and update it if invalid."
155 + echo "Check current profile and update it if invalid (internal use only)"
156 }
157
158 do_update() {
159 - # the only way we'd be without a conffile is if the user deleted it
160 - # easy enough to generate a new one though
161 - if [[ ! -e ${WXCONFFILE} ]]; then
162 - echo
163 - write_warning_msg "Could not find a current wxWidgets profile."
164 - write_warning_msg
165 - write_warning_msg "Please use eselect wxwidgets to set one."
166 - echo
167 - return 1
168 - fi
169 -
170 currconf=$(load_config ${WXCONFFILE} WXCONFIG)
171
172 - # if current config is valid, leave it alone
173 - if [[ -e ${WXCONFDIR}/${currconf} ]]; then
174 - echo
175 - echo "Current wxWidgets profile is valid."
176 - echo
177 - return 0
178 - fi
179 + # if current config is "none" leave it alone
180 + [[ ${currconf} == none ]] && return 0
181 +
182 + # if current config is valid leave it alone
183 + [[ -e ${WXCONFDIR}/${currconf} ]] && return 0
184
185 # split the config string into components
186 OIFS=${IFS}
187 @@ -150,7 +137,6 @@
188 wxdebug=(${3})
189 wxver=(${4})
190
191 -
192 # put available components into next element(s) of array
193 local component toolkit char debug ver element opt
194
195
196
197
198 --
199 gentoo-commits@g.o mailing list