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>
This commit is contained in:
Yegor Timoshenko 2018-10-07 01:58:27 +00:00 committed by Patrick Georgi
parent 15316e2321
commit c2e4941367
46 changed files with 53 additions and 46 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2007-2010 by coresystems GmbH
#

View File

@ -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';

View File

@ -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';

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
## This file is part of the coreboot project.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
## This file is part of the coreboot project.

View File

@ -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 =

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#============================================================================
#
#/** @file createxbl.py

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#===============================================================================
#
# MBN TOOLS

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# miniconfig - utility to minimize your coreboot config files
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# test to make sure the lint tests fail
SPACE=' '

View File

@ -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>

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
# This file is part of the coreboot project.

View File

@ -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>

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from setuptools import setup

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2015 Google Inc.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2016 Google Inc.
#

View File

@ -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';

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;
use warnings;
my %map;

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
files=`git diff --cached --name-only | grep '\.[ch]$'`
if [ -z "$files" ]; then
exit 0

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This file is part of the coreboot project.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This file is part of the coreboot project.
#

View File

@ -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'.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Creates `./util/README.md` and `./Documentation/Util.md` of description files
# in `./util` subdirectories

View File

@ -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