Patrice Dumas wrote :
On Fri, May 11, 2007 at 04:54:43AM -0400, Adam Tkac wrote:
> Author: atkac
>
> mtools-3.9.10-sh.patch:
I may be completly wrong, but in my recollection using
arithmetic/conditionals like
> +if [[ $# -eq 0 ]] ; then
is not sh compatible but requires some bash extensions.
It should be, instead, along
if [ $# = 0 ]; then
== also in [ ] is not portable.
I am not sure and this would benefit from double checking. In any
case, for fedora it should be fine even with the bash extensions, and
the shebang also may be changed to
#! /bin/bash
to be safe, but if it is to be submitted upstream (as it should be)
you should really take care that no bash extensions are used.
I had never seen double square brackets before, and it seems to work,
suggesting some kind of bash internal indeed... but as for plain
single square brackets, I thought "[" was a symlink to the
coreutils "test" command, but just saw on my FC6 workstation that this
is no longer the case and that those are two different binaries now.
-rwxr-xr-x 1 root root 32168 Apr 17 13:48 /usr/bin/[
-rwxr-xr-x 1 root root 29544 Apr 17 13:48 /usr/bin/test
This is all now way more complicated than I would have thought :-)
Matthias
--
Clean custom Red Hat Linux rpm packages :
http://freshrpms.net/
Fedora Core release 6 (Zod) - Linux kernel 2.6.20-1.2948.fc6
Load : 0.34 0.36 0.35