mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-13 21:04:00 +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) 2014 The Mercury team.
|
||||
# Copyright (C) 2014, 2018 The Mercury team.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
# Public License - see the file COPYING in the Mercury distribution.
|
||||
#-----------------------------------------------------------------------------#
|
||||
@@ -11,6 +11,8 @@
|
||||
#
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
set -e
|
||||
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
@@ -33,7 +35,7 @@ esac
|
||||
|
||||
echo "Configuring for host $host, assuming ${bits}-bit"
|
||||
|
||||
if which $hostcc >/dev/null
|
||||
if command -v $hostcc >/dev/null
|
||||
then
|
||||
true
|
||||
else
|
||||
@@ -41,7 +43,7 @@ else
|
||||
exit 1
|
||||
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
|
||||
true
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user