Re: sh portability questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> "Andreas" == Andreas Schwab <schwab@xxxxxxx> writes:

 > Akim Demaille <akim@xxxxxxxxxxxxx> writes:
 >> if (local foo) >/dev/null 2>&1; then :; else
 >> local () { true;  }
 >> fi

 > Note that local is only valid in function context, so this will always
 > produce a failure.

Thanks, I didn't know.  How about this then?

(
    foo=bar
    test_local () {
	local foo=foo
    }
    test_local
    test $foo = bar
) || local () {
    case $1 in
	*=*) eval "$1";;
    esac

}




_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux