Jo-Philipp Wich wrote:
> The following function supports multiple args like the original "local".
>
> if ! type "local" >/dev/null; then
> local() {
> for _v in $*; do eval "$_v=''"; done
> }
> fi
>
>
> If you add that to /etc/profile (is that supported by hush?) then it
> should be available system wide, in any script.
/etc/functions.sh would be a better place, imho. I think /etc/profile is
not automatically sourced by shell scripts. This function doesn't
currently cover all scripts, it needs to handle things like
local var="value"
as well without inserting extra = characters.
- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel