]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Replace uses of which(1) with command -v
authorsfan5 <sfan5@live.de>
Mon, 25 Oct 2021 19:56:25 +0000 (21:56 +0200)
committerrubenwardy <rw@rubenwardy.com>
Sun, 31 Oct 2021 22:32:48 +0000 (22:32 +0000)
android/gradlew
util/buildbot/buildwin32.sh
util/buildbot/buildwin64.sh
util/updatepo.sh

index 83f2acfdc319a24e8766cca78f32474ad7a22dd6..25e0c114864eb3e774bb17895759a17d4aba18c3 100755 (executable)
@@ -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."
index eceb5b788a09730bd018827e0579c1bc0048d330..c1edbfa1f08c3fa481ca690c14f52e36917b4a98 100755 (executable)
@@ -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 \
index 68d2ebf0cac50f8ea608f4c66955c8767590f90a..134bc08de7213b50ee3f40ca7000bc4bc5a51327 100755 (executable)
@@ -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 \
index dbcb16fdedd832f54eacef274c8c116d190067f5..070a44be67bc20f4e2c196daf645ca17abdd6ec3 100755 (executable)
@@ -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.