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.
This commit is contained in:
Philippe Saint-Pierre 2012-05-05 23:55:19 -04:00
parent 501546ee8f
commit 85fb3e7df8

View File

@ -79,7 +79,8 @@ if [ -z "$gcc" ]; then
fi fi
# check whether the gcc exists # 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 echo "Can't set GCC $arch/$gcc -- not installed." >&2
exit 1 exit 1
fi fi