On 05/17/2010 11:29 AM, Eric Blake wrote:
> +if test ${#SOCKPATH} -lt 108 ; then
Bash-ism. To be portable, you'd have to use something like:
if test `echo "$SOCKPATH" | wc -c` -lt 108; then
Huh, I stand (partially) corrected. POSIX requires support for ${#foo}.
If we were to use gnulib's init.sh, we would then have the guarantee
that we have enough of a POSIX environment to rely on that particular
construct. But right now, test-lib.sh doesn't quite guarantee
everything provided in gnulib.
Jim, is it time to modify test-lib.sh to borrow more ideas from gnulib's
init.sh?
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org