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

Bastian Bittorf bittorf at bluebottle.com
Fri Sep 4 09:18:47 EDT 2015


* Karl Palsson <karlp at tweak.net.au> [04.09.2015 15:02]:
> So let's -d test the directory instead of -e testing every file just in
> case the directory didn't exist?

even if the directory exists but is empty, the globbing fails.
but i get your point. what about:

[ -n "$( ls -1 $dir )" ] && {
  for FILE in $dir/*; do
    . "$FILE"
  done
}

but i dont like it! any other comments

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list