From: Joerg Albert <jal2@gmx.de>
To: Pavel Roskin <proski@gnu.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Luis R. Rodriguez" <mcgrof@gmail.com>
Subject: Re: [PATCH] compat-2.6: Makefile: fixed test expressions for target install
Date: Fri, 31 Jul 2009 20:50:06 +0200 [thread overview]
Message-ID: <4A733CDE.4060801@gmx.de> (raw)
In-Reply-To: <1248990136.10154.10.camel@mj>
On 07/30/2009 11:42 PM, Pavel Roskin wrote:
> On Thu, 2009-07-30 at 23:25 +0200, Joerg Albert wrote:
>> This removes the two errors of [ with target "install"
>>
>> make[1]: Leaving directory `/home/joerg/src/linux-2.6.30'
>> [: 9: missing ]
>> [: 9: missing ]
>> depmod will prefer updates/ over kernel/ -- OK!
>
> I believe "-a" in test is not very portable. I remember getting
> complaints about it. I believe the built-in test command in bash 1.x
> doesn't have it. I'd rather stick with && and || written properly.
>
> "-a" and -o" are currently only used in the clean target and in the
> maintenance scripts, so they probably don't get enough testing on
> systems with old bash.
Bash 3.2.39 seems to have a problem with &&, while [[ ... ]] accept it:
joerg@thinkpad:~$ echo $BASH_VERSION
3.2.39(1)-release
joerg@thinkpad:~$ if [ -z "" && -z "" ]; then echo "both empty"; fi
bash: [: missing `]'
joerg@thinkpad:~$ if [ -z "" -a -z "" ]; then echo "both empty"; fi
both empty
joerg@thinkpad:~$ if [[ -z "" && -z "" ]]; then echo "both empty"; fi
both empty
joerg@thinkpad:~$
If the link for the man page of bash v1 on http://wwwbs.informatik.htw-dresden.de/fbs/bash/old.bash.html is correct,
that version supported -a in test.
Unfortunately [[ ... ]] was introduced after bash v1 (2.02 AFAIR).
Regards,
Joerg.
next prev parent reply other threads:[~2009-07-31 18:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 21:25 [PATCH] compat-2.6: Makefile: fixed test expressions for target install Joerg Albert
2009-07-30 21:42 ` Pavel Roskin
2009-07-31 18:50 ` Joerg Albert [this message]
2009-07-31 18:56 ` Pavel Roskin
2009-07-31 19:04 ` Luis R. Rodriguez
2009-07-31 23:15 ` Joerg Albert
2009-07-31 23:22 ` Luis R. Rodriguez
2009-08-01 10:39 ` Joerg Albert
2009-08-05 18:32 ` Luis R. Rodriguez
2009-07-31 23:21 ` [PATCH v2] " Joerg Albert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A733CDE.4060801@gmx.de \
--to=jal2@gmx.de \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
--cc=proski@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).