commit:     1e715eb7fc040d5aa0495c901df699db188fef0a
Author:     Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Sat Apr 30 19:37:24 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May  2 19:05:00 2022 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=1e715eb7

newebuild: put inherit guard variable immediately after check

For new eclasses, the provided template puts the variable at the end of
the body, but the current preference is to assign the variable
immediately after the check.

Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 plugin/newebuild.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/newebuild.vim b/plugin/newebuild.vim
index e704898..166713d 100644
--- a/plugin/newebuild.vim
+++ b/plugin/newebuild.vim
@@ -49,13 +49,13 @@ fun! <SID>MakeNewEbuild()
         put =''
         let l:eclass_ident = substitute(toupper(l:eclass), "[^A-Z0-9]", "_", 
"g")
         put ='if [[ ! ${_' . l:eclass_ident . '} ]]; then'
+        put ='_' . l:eclass_ident . '=1'
         put =''
         put ='case ${EAPI} in'
         put =' 8) ;;'
         put =' *) die \"${ECLASS}: EAPI ${EAPI} unsupported.\"'
         put ='esac'
         put =''
-        put ='_' . l:eclass_ident . '=1'
         put ='fi'
         " }}}
 

Reply via email to