summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@riseup.net>2018-10-07 01:58:27 +0000
committerPatrick Georgi <pgeorgi@google.com>2018-11-17 07:32:03 +0000
commitc2e494136731571a78b2bdd7ca9dc536a8b5aecd (patch)
treea31bde7ce2d3ce4a96445200491b12c4e40a14f0 /util
parent15316e2321e9936da5f0906ec76545830938a46e (diff)
downloadcoreboot-c2e494136731571a78b2bdd7ca9dc536a8b5aecd.tar.gz
coreboot-c2e494136731571a78b2bdd7ca9dc536a8b5aecd.tar.bz2
coreboot-c2e494136731571a78b2bdd7ca9dc536a8b5aecd.zip
treewide: use /usr/bin/env where appropriate
Some Unix systems (GuixSD, NixOS) do not install programs like Bash and Python to /usr/bin, and /usr/bin/env has to be used to locate these instead. Change-Id: I7546bcb881c532adc984577ecb0ee2ec4f2efe00 Signed-off-by: Yegor Timoshenko <yegortimoshenko@riseup.net> Reviewed-on: https://review.coreboot.org/28953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/acpi/acpidump-all2
-rwxr-xr-xutil/amdtools/k8-compare-pci-space.pl3
-rwxr-xr-xutil/amdtools/k8-interpret-extended-memory-settings.pl3
-rwxr-xr-xutil/amdtools/k8-read-mem-settings.sh2
-rwxr-xr-xutil/amdtools/parse-bkdg.pl3
-rwxr-xr-xutil/board_status/set_up_live_image.sh2
-rwxr-xr-xutil/broadcom/secimage/test/hmac.sh2
-rw-r--r--util/cavium/devicetree_convert.py2
-rw-r--r--util/cbfstool/Makefile2
-rw-r--r--util/cbmem/Makefile2
-rwxr-xr-xutil/chromeos/crosfirmware.sh2
-rwxr-xr-xutil/chromeos/extract_blobs.sh4
-rw-r--r--util/ectool/Makefile2
-rwxr-xr-xutil/genprof/log2dress2
-rwxr-xr-xutil/gitconfig/gitconfig.sh2
-rw-r--r--util/ifdtool/Makefile2
-rw-r--r--util/intelmetool/Makefile2
-rw-r--r--util/inteltool/Makefile2
-rwxr-xr-xutil/ipqheader/createxbl.py2
-rwxr-xr-xutil/ipqheader/mbn_tools.py2
-rw-r--r--util/k8resdump/Makefile2
-rwxr-xr-xutil/kconfig/miniconfig2
-rwxr-xr-xutil/lint/check_lint_tests2
-rwxr-xr-xutil/lint/checkpatch_json.py2
-rwxr-xr-xutil/lint/kconfig_lint2
-rwxr-xr-xutil/me_cleaner/me_cleaner.py2
-rwxr-xr-xutil/me_cleaner/setup.py2
-rwxr-xr-xutil/mma/mma_automated_test.sh2
-rwxr-xr-xutil/mma/mma_get_result.sh2
-rwxr-xr-xutil/mma/mma_setup_test.sh2
-rw-r--r--util/nvramtool/Makefile2
-rw-r--r--util/pmh7tool/Makefile2
-rwxr-xr-xutil/release/build-release2
-rwxr-xr-xutil/release/genrelnotes2
-rwxr-xr-xutil/riscv/sifive-gpt.py2
-rwxr-xr-xutil/scripts/config2
-rwxr-xr-xutil/scripts/dts-to-fmd.sh2
-rwxr-xr-xutil/scripts/gerrit-rebase2
-rwxr-xr-xutil/scripts/get_maintainer.pl3
-rwxr-xr-xutil/scripts/parse-maintainers.pl3
-rwxr-xr-xutil/scripts/prepare-commit-msg.clang-format2
-rwxr-xr-xutil/scripts/ucode_h_to_bin.sh2
-rwxr-xr-xutil/scripts/update_submodules2
-rw-r--r--util/superiotool/Makefile2
-rwxr-xr-xutil/util_readme/util_readme.sh2
-rw-r--r--util/viatool/Makefile2
46 files changed, 53 insertions, 46 deletions
diff --git a/util/acpi/acpidump-all b/util/acpi/acpidump-all
index 2a04af049e2f..f43b7ef720b9 100755
--- a/util/acpi/acpidump-all
+++ b/util/acpi/acpidump-all
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Copyright (C) 2007-2010 by coresystems GmbH
#
diff --git a/util/amdtools/k8-compare-pci-space.pl b/util/amdtools/k8-compare-pci-space.pl
index 77fdb59dd461..505d5b47c8be 100755
--- a/util/amdtools/k8-compare-pci-space.pl
+++ b/util/amdtools/k8-compare-pci-space.pl
@@ -1,7 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
use Getopt::Long;
use strict;
+use warnings;
my $NAME = $0;
my $VERSION = '0.01';
diff --git a/util/amdtools/k8-interpret-extended-memory-settings.pl b/util/amdtools/k8-interpret-extended-memory-settings.pl
index 176defc88107..104e669d02e1 100755
--- a/util/amdtools/k8-interpret-extended-memory-settings.pl
+++ b/util/amdtools/k8-interpret-extended-memory-settings.pl
@@ -1,7 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
use Getopt::Long;
use strict;
+use warnings;
my $NAME = $0;
my $VERSION = '0.01';
diff --git a/util/amdtools/k8-read-mem-settings.sh b/util/amdtools/k8-read-mem-settings.sh
index a0e62544c8cb..55b707141e31 100755
--- a/util/amdtools/k8-read-mem-settings.sh
+++ b/util/amdtools/k8-read-mem-settings.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This is an example that generates data files that are understood by the
# k8-interpret-extended-memory-settings.pl script. Adjust the pci ids for your
diff --git a/util/amdtools/parse-bkdg.pl b/util/amdtools/parse-bkdg.pl
index d0bb4c7b6ff7..31f3873436d6 100755
--- a/util/amdtools/parse-bkdg.pl
+++ b/util/amdtools/parse-bkdg.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
my $NAME = $0;
my $VERSION = '0.01';
@@ -11,6 +11,7 @@ my $URL = "https://coreboot.org";
my $DEBUG = 0;
use strict;
+use warnings;
# Run the bkdg for k8 through pdftotext first (from the poppler package)
diff --git a/util/board_status/set_up_live_image.sh b/util/board_status/set_up_live_image.sh
index d80434eb3523..9fac15304e83 100755
--- a/util/board_status/set_up_live_image.sh
+++ b/util/board_status/set_up_live_image.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is used to set up a ubuntu-based live image to be used
# with coreboot's board_status script. It modifies the system so that
diff --git a/util/broadcom/secimage/test/hmac.sh b/util/broadcom/secimage/test/hmac.sh
index 21176bded9a0..ded0eb77dd08 100755
--- a/util/broadcom/secimage/test/hmac.sh
+++ b/util/broadcom/secimage/test/hmac.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
##
## This file is part of the coreboot project.
diff --git a/util/cavium/devicetree_convert.py b/util/cavium/devicetree_convert.py
index 70d89af6861b..656fdf6c349e 100644
--- a/util/cavium/devicetree_convert.py
+++ b/util/cavium/devicetree_convert.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# devicetree_convert Tool to convert a DTB to a static C file
# Copyright (C) 2018 Facebook Inc.
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index f4dca3f36da4..d7137e907b7f 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -6,7 +6,7 @@ CONFIG_FMD_GENPARSER ?= n
HOSTCC ?= $(CC)
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
OBJCOPY ?= objcopy
VBOOT_SOURCE ?= $(top)/3rdparty/vboot
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index 44756ded3309..eed08a4cb34c 100644
--- a/util/cbmem/Makefile
+++ b/util/cbmem/Makefile
@@ -16,7 +16,7 @@
PROGRAM = cbmem
ROOT = ../../src
CC ?= $(CROSS_COMPILE)gcc
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
CFLAGS ?= -O2
CFLAGS += -Wall -Werror
diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh
index 9e00ba6aff79..ba0c2590d2fd 100755
--- a/util/chromeos/crosfirmware.sh
+++ b/util/chromeos/crosfirmware.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#
diff --git a/util/chromeos/extract_blobs.sh b/util/chromeos/extract_blobs.sh
index af9d0262344e..a674ada91f9c 100755
--- a/util/chromeos/extract_blobs.sh
+++ b/util/chromeos/extract_blobs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#
@@ -14,6 +14,8 @@
# GNU General Public License for more details.
#
+set -x
+
IMAGE=$1
if [ ! -r "$IMAGE" ]; then
diff --git a/util/ectool/Makefile b/util/ectool/Makefile
index 234e931e4aae..c4b94da75f90 100644
--- a/util/ectool/Makefile
+++ b/util/ectool/Makefile
@@ -17,7 +17,7 @@
CC = gcc
CFLAGS = -O2 -Wall -W
PROGRAM = ectool
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/env install
PREFIX = /usr/local
OS_ARCH = $(shell uname)
diff --git a/util/genprof/log2dress b/util/genprof/log2dress
index 99d1f2f59cd6..a7ec4bfdbdd9 100755
--- a/util/genprof/log2dress
+++ b/util/genprof/log2dress
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#Parse a log and get back the function names and line numbers
#Provide a log file as first argument
diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh
index 5d6fe3610b4f..4df93cf2c5a7 100755
--- a/util/gitconfig/gitconfig.sh
+++ b/util/gitconfig/gitconfig.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
##
## This file is part of the coreboot project.
diff --git a/util/ifdtool/Makefile b/util/ifdtool/Makefile
index cf6d37812fb7..e1188b209c17 100644
--- a/util/ifdtool/Makefile
+++ b/util/ifdtool/Makefile
@@ -16,7 +16,7 @@
PROGRAM = ifdtool
CC = gcc
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/env install
PREFIX = /usr/local
CFLAGS = -O2 -g -Wall -W -Werror -I../../src/commonlib/include
LDFLAGS =
diff --git a/util/intelmetool/Makefile b/util/intelmetool/Makefile
index d8c056c3a715..128c1fe9d593 100644
--- a/util/intelmetool/Makefile
+++ b/util/intelmetool/Makefile
@@ -15,7 +15,7 @@
PROGRAM = intelmetool
CC ?= gcc
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
CFLAGS ?= -O0 -g -Wall -W -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function
LDFLAGS += -lpci -lz
diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile
index 96fd1404a5f4..d88063be75de 100644
--- a/util/inteltool/Makefile
+++ b/util/inteltool/Makefile
@@ -20,7 +20,7 @@ PROGRAM = inteltool
top ?= $(abspath ../..)
CC ?= gcc
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
CFLAGS ?= -O2 -g -Wall -W
LDFLAGS += -lpci -lz
diff --git a/util/ipqheader/createxbl.py b/util/ipqheader/createxbl.py
index b01e628544fb..7f2d9873196b 100755
--- a/util/ipqheader/createxbl.py
+++ b/util/ipqheader/createxbl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#============================================================================
#
#/** @file createxbl.py
diff --git a/util/ipqheader/mbn_tools.py b/util/ipqheader/mbn_tools.py
index c4d26c1793b6..8a17563606eb 100755
--- a/util/ipqheader/mbn_tools.py
+++ b/util/ipqheader/mbn_tools.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#===============================================================================
#
# MBN TOOLS
diff --git a/util/k8resdump/Makefile b/util/k8resdump/Makefile
index e2603511fa65..a1d4dfa682fb 100644
--- a/util/k8resdump/Makefile
+++ b/util/k8resdump/Makefile
@@ -16,7 +16,7 @@
PROGRAM = k8resdump
CC = gcc
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/env install
PREFIX = /usr/local
#CFLAGS = -O2 -g -Wall -Werror
CFLAGS = -Os -Wall -Werror
diff --git a/util/kconfig/miniconfig b/util/kconfig/miniconfig
index 065a7846f03a..29a40353d7ab 100755
--- a/util/kconfig/miniconfig
+++ b/util/kconfig/miniconfig
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# miniconfig - utility to minimize your coreboot config files
#
diff --git a/util/lint/check_lint_tests b/util/lint/check_lint_tests
index 741d2459c8dd..5ba33c8e37a4 100755
--- a/util/lint/check_lint_tests
+++ b/util/lint/check_lint_tests
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# test to make sure the lint tests fail
SPACE=' '
diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py
index 44b2a8b8875e..74ad96a10004 100755
--- a/util/lint/checkpatch_json.py
+++ b/util/lint/checkpatch_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (C) 2018 Intel Corporation.
# written by Naresh G Solanki<naresh.solanki@intel.com> and
# Maulik V Vaghela <maulik.v.vaghela@intel.com>
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 62997dd2b8e3..eddd8de6ee6d 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# This file is part of the coreboot project.
diff --git a/util/me_cleaner/me_cleaner.py b/util/me_cleaner/me_cleaner.py
index 03fbbcb56bc9..f592863f80c8 100755
--- a/util/me_cleaner/me_cleaner.py
+++ b/util/me_cleaner/me_cleaner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# me_cleaner - Tool for partial deblobbing of Intel ME/TXE firmware images
# Copyright (C) 2016-2018 Nicola Corna <nicola@corna.info>
diff --git a/util/me_cleaner/setup.py b/util/me_cleaner/setup.py
index 92fd359ad418..c831ef8962bf 100755
--- a/util/me_cleaner/setup.py
+++ b/util/me_cleaner/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
from setuptools import setup
diff --git a/util/mma/mma_automated_test.sh b/util/mma/mma_automated_test.sh
index b43325ba1474..1c324f34ad83 100755
--- a/util/mma/mma_automated_test.sh
+++ b/util/mma/mma_automated_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
diff --git a/util/mma/mma_get_result.sh b/util/mma/mma_get_result.sh
index cb30a80db7c8..f797e7f36be9 100755
--- a/util/mma/mma_get_result.sh
+++ b/util/mma/mma_get_result.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
diff --git a/util/mma/mma_setup_test.sh b/util/mma/mma_setup_test.sh
index ec7baf92ce06..b2a0de92bc99 100755
--- a/util/mma/mma_setup_test.sh
+++ b/util/mma/mma_setup_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile
index 8da7c76c8c9c..f5a4fd5d700c 100644
--- a/util/nvramtool/Makefile
+++ b/util/nvramtool/Makefile
@@ -17,7 +17,7 @@
PROGRAM = nvramtool
CC = gcc
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/env install
PREFIX = /usr/local
CFLAGS = -O2 -g -Wall -W -I. -DCMOS_HAL=1
#CFLAGS = -Os -Wall
diff --git a/util/pmh7tool/Makefile b/util/pmh7tool/Makefile
index 091fbc533eca..384d3d9c4e93 100644
--- a/util/pmh7tool/Makefile
+++ b/util/pmh7tool/Makefile
@@ -16,7 +16,7 @@
CC = gcc
CFLAGS = -O2 -Wall -W -Werror
PROGRAM = pmh7tool
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/env install
PREFIX = /usr/local
all: $(PROGRAM)
diff --git a/util/release/build-release b/util/release/build-release
index a3cec3eb8c14..e4330d450d05 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# ${VERSION_NAME}: new version name
# ${COMMIT_ID}: commit id (if not master)
# ${USERNAME}: username (if not default to https)
diff --git a/util/release/genrelnotes b/util/release/genrelnotes
index 3038eb3de813..42848a18a263 100755
--- a/util/release/genrelnotes
+++ b/util/release/genrelnotes
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#
diff --git a/util/riscv/sifive-gpt.py b/util/riscv/sifive-gpt.py
index fd82997fc6a1..7f522d9379d8 100755
--- a/util/riscv/sifive-gpt.py
+++ b/util/riscv/sifive-gpt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
# This file is part of the coreboot project.
#
# Copyright (C) 2018 Jonathan Neuschäfer
diff --git a/util/scripts/config b/util/scripts/config
index e0e39826dae9..ba11e350e8af 100755
--- a/util/scripts/config
+++ b/util/scripts/config
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0
# Manipulate options in a .config file from the command line
diff --git a/util/scripts/dts-to-fmd.sh b/util/scripts/dts-to-fmd.sh
index 00e718bebd6c..b468b35bcd7f 100755
--- a/util/scripts/dts-to-fmd.sh
+++ b/util/scripts/dts-to-fmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Copyright 2015 Google Inc.
#
diff --git a/util/scripts/gerrit-rebase b/util/scripts/gerrit-rebase
index c4f8a80e2a9a..276142d6b9be 100755
--- a/util/scripts/gerrit-rebase
+++ b/util/scripts/gerrit-rebase
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2016 Google Inc.
#
diff --git a/util/scripts/get_maintainer.pl b/util/scripts/get_maintainer.pl
index 4f34a4e6fba7..c24a6d4d69a9 100755
--- a/util/scripts/get_maintainer.pl
+++ b/util/scripts/get_maintainer.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# (c) 2007, Joe Perches <joe@perches.com>
# created from checkpatch.pl
#
@@ -11,6 +11,7 @@
# Licensed under the terms of the GNU GPL License version 2
use strict;
+use warnings;
my $P = $0;
my $V = '0.26';
diff --git a/util/scripts/parse-maintainers.pl b/util/scripts/parse-maintainers.pl
index a0fe34349b24..c0fd88cdc3dd 100755
--- a/util/scripts/parse-maintainers.pl
+++ b/util/scripts/parse-maintainers.pl
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
use strict;
+use warnings;
my %map;
diff --git a/util/scripts/prepare-commit-msg.clang-format b/util/scripts/prepare-commit-msg.clang-format
index 7033f3cc07b5..a6b3d08a265b 100755
--- a/util/scripts/prepare-commit-msg.clang-format
+++ b/util/scripts/prepare-commit-msg.clang-format
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
files=`git diff --cached --name-only | grep '\.[ch]$'`
if [ -z "$files" ]; then
exit 0
diff --git a/util/scripts/ucode_h_to_bin.sh b/util/scripts/ucode_h_to_bin.sh
index 2d7f5fa132cf..f08b053b8e32 100755
--- a/util/scripts/ucode_h_to_bin.sh
+++ b/util/scripts/ucode_h_to_bin.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#
diff --git a/util/scripts/update_submodules b/util/scripts/update_submodules
index b555495edadb..68d8a948accb 100755
--- a/util/scripts/update_submodules
+++ b/util/scripts/update_submodules
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This file is part of the coreboot project.
#
diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile
index cedd63128fef..3a0bcf0abe4f 100644
--- a/util/superiotool/Makefile
+++ b/util/superiotool/Makefile
@@ -17,7 +17,7 @@
PROGRAM = superiotool
CC ?= gcc
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
# Set the superiotool version string to the output of 'git describe'.
diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh
index 420ffae6988a..cdd94dcb1ab2 100755
--- a/util/util_readme/util_readme.sh
+++ b/util/util_readme/util_readme.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Creates `./util/README.md` and `./Documentation/Util.md` of description files
# in `./util` subdirectories
diff --git a/util/viatool/Makefile b/util/viatool/Makefile
index 365497a308e2..b2a62917d66d 100644
--- a/util/viatool/Makefile
+++ b/util/viatool/Makefile
@@ -19,7 +19,7 @@
PROGRAM = viatool
CC ?= gcc
-INSTALL ?= /usr/bin/install
+INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
CFLAGS ?= -O2 -g -Wall -W -I$(CURDIR)
LDFLAGS += -lpci -lz