1 |
On Wed, Jun 24, 2015 at 05:54:31PM +0200, Michał Górny wrote: |
2 |
> Dnia 2015-06-24, o godz. 15:38:34 |
3 |
> "William Hubbs (williamh)" <williamh@g.o> napisał(a): |
4 |
|
5 |
*snip* |
6 |
|
7 |
> > # @FUNCTION: _golang-build_setup |
8 |
> > # @INTERNAL |
9 |
> > # @DESCRIPTION: |
10 |
> > # Make sure EGO_PN has a value. |
11 |
> > _golang-build_setup() { |
12 |
> > [ -z "${EGO_PN}" ] && |
13 |
> |
14 |
> Please don't use 'unsafe' single brackets. Use bash's double brackets, |
15 |
> i.e. [[ -z ${EGO_PN} ]]. |
16 |
|
17 |
Ok, this will be fixed. |
18 |
|
19 |
> > golang-build_src_compile() { |
20 |
> > debug-print-function ${FUNCNAME} "$@" |
21 |
> > |
22 |
> > _golang-build_setup |
23 |
> > set -- env GOPATH="${WORKDIR}/${P}:${EPREFIX}/usr/lib/go-gentoo" \ |
24 |
> > go build -v -work -x "${EGO_PN}" |
25 |
> > echo "$@" |
26 |
> |
27 |
> I suggest to push this to stderr, >&2. |
28 |
|
29 |
Why? this is just printing the command before we run it. Do Make, etc |
30 |
print this output to stderr? |
31 |
|
32 |
> |
33 |
> > "$@" || die |
34 |
> |
35 |
> And anyway, this looks to have a common, repeating part that sounds |
36 |
> like a good candidate for separate emake-like function... ego? :D |
37 |
|
38 |
Do you mean these lines: |
39 |
|
40 |
echo "$@" |
41 |
"$@" || die |
42 |
|
43 |
William |