Skip to content

Commit

Permalink
Use /usr/bin/env in shebang lines
Browse files Browse the repository at this point in the history
This improves portability as not all systems have bash, perl, or python
in /usr/bin (FreeBSD is one such example).
  • Loading branch information
tautschnig committed Nov 20, 2023
1 parent ae8f0f4 commit 66de8b3
Show file tree
Hide file tree
Showing 53 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Runs scripts/cpplint.py on the modified files
# Based on https://github.com/s0enke/git-hooks/
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-check-clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Stop on errors
set -e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-check-cpplint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Stop on errors
set -e
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen-root/doxygen-markdown/markdown.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion doc/slides/cbmc-latex-beamer/do_figures
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

FIG="cbmc-flow.fig frontend.fig"

Expand Down
2 changes: 1 addition & 1 deletion integration/linux/compile_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Fail on errors
# set -e # not for now
Expand Down
2 changes: 1 addition & 1 deletion jbmc/regression/jbmc-json-ui/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

JBMC_PATH=$1
shift
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

mvn package
java -cp target/jsonGenerator-1.0-SNAPSHOT-jar-with-dependencies.jar:. org.cprover.JsonGenerator
Expand Down
2 changes: 1 addition & 1 deletion jbmc/regression/strings-smoke-tests/performance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

'''
This script collects the running times of the tests present in the current
Expand Down
2 changes: 1 addition & 1 deletion regression/acceleration/accelerate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cleanup()
{
Expand Down
2 changes: 1 addition & 1 deletion regression/contracts-dfcc/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/contracts/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/extract_type_header/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-analyzer-simplify/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-harness-multi-file-project/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -x
set -e
Expand Down
2 changes: 1 addition & 1 deletion regression/goto-harness/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-inspect/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument-chc/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument-json/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument-typedef/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument-wmm-core/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/goto-synthesizer/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/k-induction/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/linking-goto-binaries/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/memory-analyzer/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/snapshot-harness/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/solver-hardness/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cbmc=$1

Expand Down
2 changes: 1 addition & 1 deletion regression/symtab2gb-cbmc/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/symtab2gb/chain.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/test-script/program_runner.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion regression/test.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl

use subs;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion scripts/bash-autocomplete/cbmc.sh.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
_cbmc_autocomplete()
{
#list of all switches cbmc has. IMPORTANT: in the template file, this variable must be defined on line 5.
Expand Down
2 changes: 1 addition & 1 deletion scripts/bash-autocomplete/extract_switches.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark/process_wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

_term() {
# Remove the handler first
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_doxygen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion scripts/check_help.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion scripts/csmith.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This script runs CSmith to generate N examples, and for each of them:
# 1. Compiles the code with the system compiler.
Expand Down
2 changes: 1 addition & 1 deletion scripts/format_classpath.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

unameOut="$(uname -s)"
case "${unameOut}" in
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-rpm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

svn export http://svn.cprover.org/svn/cbmc
mv cbmc cbmc-3.9
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_diff.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_doxygen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

echo "Running doxygen version $(doxygen --version)"

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

script_folder=`dirname $0`

Expand Down
2 changes: 1 addition & 1 deletion scripts/run_test_upload_cov_report.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail
FLAG=$1
Expand Down
2 changes: 1 addition & 1 deletion scripts/string_table_check.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

whitelist=" \
"
Expand Down
2 changes: 1 addition & 1 deletion src/ansi-c/compiler_headers/get-gcc-builtins.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/dist-linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
umask u=rwx,g=rx,o=rx

make
Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/dist-macos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
umask u=rwx,g=rx,o=rx

# http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html
Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/dist-src
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
umask u=rwx,g=rx,o=rx

VERSION=`./cbmc --version`
Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/dist-win
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

make
strip cbmc.exe
Expand Down
2 changes: 1 addition & 1 deletion src/goto-cc/dist-linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
make
strip goto-cc

Expand Down
2 changes: 1 addition & 1 deletion src/goto-cc/dist-win
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

make
strip goto-cc.exe
Expand Down
2 changes: 1 addition & 1 deletion src/goto-diff/scripts/diff-filter.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl -w

use strict;

Expand Down

0 comments on commit 66de8b3

Please sign in to comment.