On Sat, Oct 01, 2016 at 12:05:16AM +0200, Lars Kruse wrote: > Am Fri, 30 Sep 2016 22:02:19 +0200 schrieb Jan-Tarek Butt <ta...@ring0.de>: > > - libdirs="$libdirs $(cd "$libdir"; pwd)/" > > + libdirs="$libdirs $(cd "$libdir" || exit; > > pwd)/" fi > > I am not sure, if this script is supposed to break on every missing libdir (I > do not know the context). Thus maybe " && " would be better instead ";"? > note that all cases in this patch (except those i pointed out in the other mail) are commands within $() or (), i.e., subshells. thus, the exit calls all only exit that respective scope. and it's true that in most cases using '&&' instead of '|| exit;' would be more elegant.
another implication of that is that complete error handling would imply a lot more "visual noise". e.g.: libdirs="$libdirs $(cd "$libdir" && pwd)/" || exit (this assumes that the exit code of the nested command persists through the assignment, which it is supposed to do). _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev