[Surfraw-devel] surfraw-2.2.2: A bashism and a conflicting name

Thomas Klausner tk at giga.or.at
Sun Aug 24 10:18:59 UTC 2008


Hi!

There's a bashism in elvi/google:
-if test -n "$SURFRAW_lang" -a "$SURFRAW_google_country" == "us"; then
+if test -n "$SURFRAW_lang" -a "$SURFRAW_google_country" = "us"; then

While it is true that in bash, the included test(1) accepts a double
equal sign ("==") as comparison operator, all other shells I know of
and even test(1) from GNU coreutils prefer a single equal sign ("=").

Also, please don't install "sr": if someone wants it, he or she can
very easily define an alias for it, and the name conflicts with the
"sr" executable from the language of the same name
(http://www.cs.arizona.edu/sr/). I can send patches for this if you
want.

Cheers,
 Thomas



More information about the Surfraw-devel mailing list