Make shebangs portable used in the repo portable (#46028)

Not all systems have `/bin/bash` (for example NixOS).

`/usr/bin/env bash` reads the location of bash from `PATH`

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This commit is contained in:
Jan Kaifer 2023-02-17 10:45:42 +01:00 committed by GitHub
parent ebcde03648
commit 22e28ff9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu # stop on error
export HOME=/root

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
for folder in examples/* ; do
if [ -f "$folder/package.json" ]; then

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
START_DIR=$PWD
# gets last argument which should be the project dir

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]];
then