mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 05:44:58 +00:00
Avoid which utility.
tools/configure_mingw_cross:
Use shell builtin `command -v' instead of which(1).
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh
|
||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
# Copyright (C) 2012 The University of Melbourne.
|
# Copyright (C) 2012 The University of Melbourne.
|
||||||
# Copyright (C) 2014 The Mercury team.
|
# Copyright (C) 2014, 2018 The Mercury team.
|
||||||
# This file may only be copied under the terms of the GNU General
|
# This file may only be copied under the terms of the GNU General
|
||||||
# Public License - see the file COPYING in the Mercury distribution.
|
# Public License - see the file COPYING in the Mercury distribution.
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
#
|
#
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
for arg
|
for arg
|
||||||
do
|
do
|
||||||
case $arg in
|
case $arg in
|
||||||
@@ -33,7 +35,7 @@ esac
|
|||||||
|
|
||||||
echo "Configuring for host $host, assuming ${bits}-bit"
|
echo "Configuring for host $host, assuming ${bits}-bit"
|
||||||
|
|
||||||
if which $hostcc >/dev/null
|
if command -v $hostcc >/dev/null
|
||||||
then
|
then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
@@ -41,7 +43,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which mmc >/dev/null && mmc -v 2>&1 | grep -q Mercury
|
if command -v mmc >/dev/null && mmc -v 2>&1 | grep -q Mercury
|
||||||
then
|
then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user