[haiku-commits] haiku: hrev44116 - data/bin

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 6 May 2012 05:58:34 +0200 (CEST)

hrev44116 adds 1 changeset to branch 'master'
old head: 501546ee8f87e93de7c6bad3eb0e977d6555ee7f
new head: 85fb3e7df81f8d5b6e47a9a64a53873ea906ea6e

----------------------------------------------------------------------------

85fb3e7: setgcc: error message
  
  The bash script tried to verify the existence of a file,
  but there were several fils fitting the wildcard expression.
  So, [ -e .../*gcc ]; was interpreted as if it had too many
  arguments.  Replaced that expression by a count of files.
  
  Fixes #8493.

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44116
Commit:      85fb3e7df81f8d5b6e47a9a64a53873ea906ea6e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=85fb3e7
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Sun May  6 03:55:19 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8493

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 1 deletion(-)
data/bin/setgcc |    3 ++-

----------------------------------------------------------------------------

diff --git a/data/bin/setgcc b/data/bin/setgcc
index 866dc6c..3d54123 100755
--- a/data/bin/setgcc
+++ b/data/bin/setgcc
@@ -79,7 +79,8 @@ if [ -z "$gcc" ]; then
 fi
 
 # check whether the gcc exists
-if [ ! -e $abiDir/$arch/$gcc/tools/current/bin/*gcc ]; then
+count=`ls $abiDir/$arch/$gcc/tools/current/bin/*gcc 2>/dev/null | wc -l`
+if [ $count -eq 0 ]; then
        echo "Can't set GCC $arch/$gcc -- not installed." >&2
        exit 1
 fi


Other related posts: