Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: plugin/
Date: Mon, 02 May 2022 19:06:06
Message-Id: 1651518300.1e715eb7fc040d5aa0495c901df699db188fef0a.mgorny@gentoo
1 commit: 1e715eb7fc040d5aa0495c901df699db188fef0a
2 Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
3 AuthorDate: Sat Apr 30 19:37:24 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 19:05:00 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=1e715eb7
7
8 newebuild: put inherit guard variable immediately after check
9
10 For new eclasses, the provided template puts the variable at the end of
11 the body, but the current preference is to assign the variable
12 immediately after the check.
13
14 Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
15 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
16
17 plugin/newebuild.vim | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/plugin/newebuild.vim b/plugin/newebuild.vim
21 index e704898..166713d 100644
22 --- a/plugin/newebuild.vim
23 +++ b/plugin/newebuild.vim
24 @@ -49,13 +49,13 @@ fun! <SID>MakeNewEbuild()
25 put =''
26 let l:eclass_ident = substitute(toupper(l:eclass), "[^A-Z0-9]", "_", "g")
27 put ='if [[ ! ${_' . l:eclass_ident . '} ]]; then'
28 + put ='_' . l:eclass_ident . '=1'
29 put =''
30 put ='case ${EAPI} in'
31 put =' 8) ;;'
32 put =' *) die \"${ECLASS}: EAPI ${EAPI} unsupported.\"'
33 put ='esac'
34 put =''
35 - put ='_' . l:eclass_ident . '=1'
36 put ='fi'
37 " }}}