[arch-projects] [devtools] [PATCH] makechrootpkg: Avoid having code floating around outside of a function.

lukeshu at lukeshu.com lukeshu at lukeshu.com
Wed Apr 5 23:06:09 UTC 2017


> > -declare -a install_pkgs
> > -declare -i ret=0
> > +	declare -a install_pkgs
> > +	declare -i ret=0
> 
> By using declare here, you're scoping the variables to the function.

You are, of course, correct.  I'm submitting a revised patch that adds
the `-g` flag to `declare`.

Also, as I mention in the revised commit message, you may wish to get
rid of the init_variables() function, and move that bit into the
main() function; which would make the concern go away.

-- 
Happy hacking,
~ Luke Shumaker


More information about the arch-projects mailing list