Skip to contentSkip to conversation

support: do not depend on bash

PATCH New Yann E. MORIN 2 participants 3 messages Mar 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support: do not depend on bash

From: "Yann E. MORIN" <[email protected]>

We do want to work properly whatever the system shell or the user's login shell are.

The current check is anyway broken, as it only checks if the user's login shell is bash, not what the system shell is.

Remove the check altogether, since it is unneeded, and broken.

Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Andrew Barnes <[email protected]>
---
 support/dependencies/dependencies.sh | 7 -------
 1 file changed, 7 deletions(-)
support/dependencies/dependencies.sh +0 -7
index a8261b3..8de1013 100755
@@ -138,13 +138,6 @@ if [ ! -z "$CXXCOMPILER" ] ; then
 	fi
 fi
 
-# Check bash
-if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then
-	echo
-	echo "You must install 'bash' on your build machine";
-	exit 1;
-fi;
-
 # Check that a few mandatory programs are installed
 missing_progs="no"
 for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 support: do not depend on bash

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

From: "Yann E. MORIN" <[email protected]>
We do want to work properly whatever the system shell or the user's login shell are.

The current check is anyway broken, as it only checks if the user's login shell is bash, not what the system shell is.

Remove the check altogether, since it is unneeded, and broken.

But we (currently atleast) do want bash for our own Makefiles (see toplevel Makefile). I'm not sure we're completely bashism-free (or if it is worth the trouble to be so).

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 support: do not depend on bash

Peter, All,

On 2014-03-18 23:32 +0100, Peter Korsgaard spake thusly:

Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

From: "Yann E. MORIN" <[email protected]>
We do want to work properly whatever the system shell or the user's login shell are.

Quoted 8 lines
Quoted 4 lines

The current check is anyway broken, as it only checks if the user's login shell is bash, not what the system shell is.

Remove the check altogether, since it is unneeded, and broken.

But we (currently atleast) do want bash for our own Makefiles (see toplevel Makefile). I'm not sure we're completely bashism-free (or if it is worth the trouble to be so).

OK, but then the check is jsut borked, since it does not check that basj is isntalled on the system.

Notes:
- SHELL is set in the environment by the login shell;
- if one has bash as login shell, but sub-sequently runs dash, dahs does not reset SHELL and does not set it; instead, it uses the value that was pre-exisiting in the environment when it was launched.

So, all the current shell tests is whether the user's login shell is bash.

If instead we want to check that we do have bash installed on the system, we need to fix the test.

As it is now, it is only confusing.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'