
17 May
2010
17 May
'10
8:25 p.m.
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@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org