Skip to content

Commit

Permalink
Replace which by POSIX command -v (GPSBabel#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
jspricke authored Jan 24, 2022
1 parent 113966a commit a3b3355
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions testo
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ utf8bomcheck()
xmlwfcheck()
{
if [ -z "${VALGRIND}" ]; then
if which ${XMLWF} >/dev/null 2>&1; then
if command -v ${XMLWF} >/dev/null 2>&1; then
# xmlwf is a bit lame, exit status is always 0
rm -f ${TMPDIR}/xmlwf.out
${XMLWF} $1 2>&1 | tee ${TMPDIR}/xmlwf.out
Expand Down Expand Up @@ -173,7 +173,7 @@ if [ -z "${VALGRIND}" ]; then
fi

if [ -z "${VALGRIND}" ]; then
if which ${XMLWF} >/dev/null 2>&1; then
if command -v ${XMLWF} >/dev/null 2>&1; then
echo "Running well-formed XML test"
for i in ${XMLS}
do
Expand Down
2 changes: 1 addition & 1 deletion testo.d/kml.test
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ compare ${REFERENCE}/realtime.kml ${TMPDIR}/realtime.kml

if [ "${RUNNINGVALGRIND}" != "0" ]; then
set -e
if which xmllint > /dev/null;
if command -v xmllint > /dev/null;
then
KMLS=$(find ${REFERENCE} -name \*.kml)
for f in $KMLS
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile_f32
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
WORKDIR /app

# basic tools to build
RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
dnf clean all
# libraries used by gpsbabel. zlib and shapelib may or may not be used depending qmake options.
RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile_f33
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
WORKDIR /app

# basic tools to build
RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
dnf clean all
# libraries used by gpsbabel. zlib and shapelib may or may not be used depending qmake options.
RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile_f34
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
WORKDIR /app

# basic tools to build
RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
dnf clean all
# libraries used by gpsbabel. zlib and shapelib may or may not be used depending qmake options.
RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile_f35
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL maintainer="https://github.com/tsteven4"
WORKDIR /app

# basic tools to build
RUN dnf install --assumeyes git make valgrind diffutils which findutils langpacks-en && \
RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en && \
dnf clean all
# libraries used by gpsbabel. zlib and shapelib may or may not be used depending qmake options.
RUN dnf install --assumeyes libusb1-devel zlib-devel shapelib-devel && \
Expand Down
2 changes: 1 addition & 1 deletion tools/nuke_format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# usage nuke_format format_name

SED=$(which gsed)
SED=$(command -v gsed)
EDITOR="${EDITOR:-vim}"

# $1 = format $2 = file in all functions
Expand Down
2 changes: 1 addition & 1 deletion vtesto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vg_version_warning() {
echo "If you get \"unhandled instruction bytes: 0xF 0xC7\" warnings from" 1>&2
echo "valgrind your valgrind is too old." 1>&2
echo "valgrind 3.13.0 and later should not have this problem." 1>&2
echo "$(which valgrind) is $(valgrind --version)" 1>&2
echo "$(command -v valgrind) is $(valgrind --version)" 1>&2
echo "" 1>&2
}

Expand Down

0 comments on commit a3b3355

Please sign in to comment.