diff options
author | sfan5 <sfan5@live.de> | 2021-10-25 21:56:25 +0200 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2021-10-31 22:32:48 +0000 |
commit | ea1396f85693ee1f752219d91adcacb32041fc84 (patch) | |
tree | 0410299bcc60e11f35d38518f7900560557dc689 | |
parent | 4114e3047bd2cc975d829f24d73991650817ad66 (diff) | |
download | minetest-ea1396f85693ee1f752219d91adcacb32041fc84.tar.gz minetest-ea1396f85693ee1f752219d91adcacb32041fc84.tar.bz2 minetest-ea1396f85693ee1f752219d91adcacb32041fc84.zip |
Replace uses of which(1) with command -v
-rwxr-xr-x | android/gradlew | 2 | ||||
-rwxr-xr-x | util/buildbot/buildwin32.sh | 6 | ||||
-rwxr-xr-x | util/buildbot/buildwin64.sh | 6 | ||||
-rwxr-xr-x | util/updatepo.sh | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/android/gradlew b/android/gradlew index 83f2acfdc..25e0c1148 100755 --- a/android/gradlew +++ b/android/gradlew @@ -98,7 +98,7 @@ location of your Java installation." fi else JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + command -v java >/dev/null || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index eceb5b788..c1edbfa1f 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -19,9 +19,9 @@ builddir="$( cd "$builddir" && pwd )" libdir=$builddir/libs # Test which win32 compiler is present -which i686-w64-mingw32-gcc &>/dev/null && +command -v i686-w64-mingw32-gcc >/dev/null && toolchain_file=$dir/toolchain_i686-w64-mingw32.cmake -which i686-w64-mingw32-gcc-posix &>/dev/null && +command -v i686-w64-mingw32-gcc-posix >/dev/null && toolchain_file=$dir/toolchain_i686-w64-mingw32-posix.cmake if [ -z "$toolchain_file" ]; then @@ -146,7 +146,7 @@ cmake -S $sourcedir -B . \ -DCURL_INCLUDE_DIR=$libdir/curl/include \ -DCURL_LIBRARY=$libdir/curl/lib/libcurl.dll.a \ \ - -DGETTEXT_MSGFMT=`which msgfmt` \ + -DGETTEXT_MSGFMT=`command -v msgfmt` \ -DGETTEXT_DLL="$gettext_dlls" \ -DGETTEXT_INCLUDE_DIR=$libdir/gettext/include \ -DGETTEXT_LIBRARY=$libdir/gettext/lib/libintl.dll.a \ diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index 68d2ebf0c..134bc08de 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -19,9 +19,9 @@ builddir="$( cd "$builddir" && pwd )" libdir=$builddir/libs # Test which win64 compiler is present -which x86_64-w64-mingw32-gcc &>/dev/null && +command -v x86_64-w64-mingw32-gcc >/dev/null && toolchain_file=$dir/toolchain_x86_64-w64-mingw32.cmake -which x86_64-w64-mingw32-gcc-posix &>/dev/null && +command -v x86_64-w64-mingw32-gcc-posix >/dev/null && toolchain_file=$dir/toolchain_x86_64-w64-mingw32-posix.cmake if [ -z "$toolchain_file" ]; then @@ -146,7 +146,7 @@ cmake -S $sourcedir -B . \ -DCURL_INCLUDE_DIR=$libdir/curl/include \ -DCURL_LIBRARY=$libdir/curl/lib/libcurl.dll.a \ \ - -DGETTEXT_MSGFMT=`which msgfmt` \ + -DGETTEXT_MSGFMT=`command -v msgfmt` \ -DGETTEXT_DLL="$gettext_dlls" \ -DGETTEXT_INCLUDE_DIR=$libdir/gettext/include \ -DGETTEXT_LIBRARY=$libdir/gettext/lib/libintl.dll.a \ diff --git a/util/updatepo.sh b/util/updatepo.sh index dbcb16fde..070a44be6 100755 --- a/util/updatepo.sh +++ b/util/updatepo.sh @@ -13,7 +13,7 @@ abort() { # this script is. Relative paths are fine for us so we can just # use the following trick (works both for manual invocations and for # script found from PATH) -scriptisin="$(dirname "$(which "$0")")" +scriptisin="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # The script is executed from the parent of po/, which is also the # parent of the script directory and of the src/ directory. |