* Felix Fietkau <n...@nbd.name> [02.10.2016 17:48]:
> >> +[ -n "$TOPDIR" ] && cd "$TOPDIR" || exit
> >>  
> > these two are plain broken, as the script would just exit if TOPDIR is
> > empty. you need to use braces.
> I think a better approach would be to write a wrapper for cd, making it
> easier to read and review.

i dont think this is a good idea:

if your wrap a wrapper around a wrapper, you will make it
less readable and even more worse: you will confuse a static
checker like shellcheck.

dont see the checker like a "endmonster" you are fighting against.
so this means, even if we loose the 1-liner-contest:

[ -n "$TOPDIR" ] && {
  cd "$TOPDIR" || errorhandler
}

bye, bastian

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to