From 85fb3e7df81f8d5b6e47a9a64a53873ea906ea6e Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sat, 5 May 2012 23:55:19 -0400 Subject: [PATCH] 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. --- data/bin/setgcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/bin/setgcc b/data/bin/setgcc index 866dc6cfc4..3d54123f1a 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