2008-05-25 16:00:08

by Christian Kujau

[permalink] [raw]
Subject: remove bashism in lib/blkid/test_probe.in

Hi,

while running "make check" on a current e2fsprogs.pu git tree fails with:

----
cramfs: + test ! -f ./tests/cramfs.img.bz2 -a ! -f ./tests/cramfs.results
+ bunzip2
+ [ cramfs == swap0 ]
[: 1: ==: unexpected operator
+ [ cramfs == swap1 ]
[: 1: ==: unexpected operator
----

My /bin/sh is not linked to bash but to dash (which is basically "sh") and
thus "==" comparisons fail. checkbashisms (part of Debian's devscripts)
catches this too:

----
possible bashism in ./test_probe line 26 (should be 'b = a'):
if [ "$i" == "swap0" ]; then
----

Changing == to = makes "make check" happy :)
http://nerdbynature.de/bits/e2fsprogs.pu/test_probe.in.diff.txt

Thanks,
Christian.
--
BOFH excuse #169:

broadcast packets on wrong frequency


2008-05-26 00:27:41

by Theodore Ts'o

[permalink] [raw]
Subject: Re: remove bashism in lib/blkid/test_probe.in

On Sun, May 25, 2008 at 06:00:06PM +0200, Christian Kujau wrote:
> while running "make check" on a current e2fsprogs.pu git tree fails with:
>
> [: 1: ==: unexpected operator
> + [ cramfs == swap1 ]

Thanks, fixed. I've updated the git repository to deal with the
problems you reported.

- Ted