Navigation Menu

Skip to content

Commit

Permalink
Replace uses of which(1) with command -v
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 authored and rubenwardy committed Oct 31, 2021
1 parent 4114e30 commit ea1396f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion android/gradlew
Expand Up @@ -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."
Expand Down
6 changes: 3 additions & 3 deletions util/buildbot/buildwin32.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions util/buildbot/buildwin64.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion util/updatepo.sh
Expand Up @@ -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.
Expand Down

0 comments on commit ea1396f

Please sign in to comment.