From ef8ab7de84502b1121150a38a34fe52ecebbeb55 Mon Sep 17 00:00:00 2001 From: Leonardo Taccari Date: Mon, 28 Dec 2020 14:50:38 +0100 Subject: [PATCH] Consistently use `#! /usr/bin/env bash' as shebang (#2308) This increase portability of semgrep on platforms not having bash as /bin/bash. --- scripts/build-wheels.sh | 2 +- scripts/osx-release.sh | 2 +- scripts/ubuntu-generic.sh | 2 +- scripts/ubuntu-release.sh | 2 +- scripts/validate-docker-release.sh | 2 +- scripts/validate-osx-release.sh | 2 +- semgrep-core/cli/flags.sh | 2 +- semgrep-core/tests/report_test_metrics.sh | 2 +- semgrep/tests/run-perf-tests.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/build-wheels.sh b/scripts/build-wheels.sh index d3ce37901c46..05b2da8518bc 100755 --- a/scripts/build-wheels.sh +++ b/scripts/build-wheels.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e pip install setuptools wheel cd semgrep && python setup.py sdist bdist_wheel diff --git a/scripts/osx-release.sh b/scripts/osx-release.sh index 86ddb532445f..741cbdfc12d2 100755 --- a/scripts/osx-release.sh +++ b/scripts/osx-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e brew install opam pkg-config coreutils opam init --no-setup --bare; diff --git a/scripts/ubuntu-generic.sh b/scripts/ubuntu-generic.sh index 34ce526bf097..b5facd809fb1 100755 --- a/scripts/ubuntu-generic.sh +++ b/scripts/ubuntu-generic.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e version="${VERSION:?Set a version to install}" tarball=semgrep-v$version-ubuntu-16.04.tgz diff --git a/scripts/ubuntu-release.sh b/scripts/ubuntu-release.sh index 3423ea33f778..9bc96b6b0bcd 100755 --- a/scripts/ubuntu-release.sh +++ b/scripts/ubuntu-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash # # Make a semgrep release for Linux x86_64. # diff --git a/scripts/validate-docker-release.sh b/scripts/validate-docker-release.sh index cf72551fd6ad..96d83a2389b9 100755 --- a/scripts/validate-docker-release.sh +++ b/scripts/validate-docker-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#! /usr/bin/env bash -e version="${GITHUB_REF/refs\/tags\//}" version="${version:-$VERSION}" version="${version:?Version must be set}" diff --git a/scripts/validate-osx-release.sh b/scripts/validate-osx-release.sh index 6c0a4fe1a860..ade0bdf0f04e 100755 --- a/scripts/validate-osx-release.sh +++ b/scripts/validate-osx-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e echo "Loading version from file: $(cat version)" diff --git a/semgrep-core/cli/flags.sh b/semgrep-core/cli/flags.sh index 96025a30f081..37b9c934361d 100755 --- a/semgrep-core/cli/flags.sh +++ b/semgrep-core/cli/flags.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash # # Use static linking if platform allows. # diff --git a/semgrep-core/tests/report_test_metrics.sh b/semgrep-core/tests/report_test_metrics.sh index abcd9ac37f26..aeb3b3be49e7 100755 --- a/semgrep-core/tests/report_test_metrics.sh +++ b/semgrep-core/tests/report_test_metrics.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e HOST="https://dashboard.semgrep.dev" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/semgrep/tests/run-perf-tests.sh b/semgrep/tests/run-perf-tests.sh index d23590fdb432..c3ccc1121510 100755 --- a/semgrep/tests/run-perf-tests.sh +++ b/semgrep/tests/run-perf-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash set -e # set -x