[OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support

Jo-Philipp Wich jow at openwrt.org
Fri Sep 4 05:58:31 EDT 2015


> Why the -e?  You only got existing files in the glob above right? 

Almost. If the directory does not exist or is empty then the glob
pattern is returned literally, e.g. "echo /tmp/*" will expand to a list
of files but "echo /does_not_exist/*" will return "/does_not_exist/*"
literaly so the for-in loop will run once with the literal glob pattern
as argument, therefore the "-e" test is required.

~ Jow
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list