diff options
author | Roy Marples <roy@marples.name> | 2019-07-10 11:29:02 +0300 |
---|---|---|
committer | isaacs <nope@not.real> | 2019-07-11 01:10:29 +0300 |
commit | f52673fc7284e58af8c04533e82b76bf7add72cf (patch) | |
tree | 3b77b2040964734675ba22d66835b01bef994e6b | |
parent | a2ea7f9ff64ae743d05fdbf7d46fb9afafa8aa6f (diff) |
build: use /usr/bin/env to load bash
On BSD platforms, there is a clear seperation between the OS and third
party packages. Here, bash is a third party package so it won't be
installed to /bin.
FreeBSD: /usr/local/bin/bash
NetBSD: /usr/pkg/bin/bash
OpenBSD: /usr/ports/bin/bash
As such, we need to use /usr/bin/env to launch these scripts.
Credit: @rsmarples
PR-URL: https://github.com/npm/cli/pull/212
Close: #212
Reviewed-by: @isaacs
-rwxr-xr-x | configure | 2 | ||||
-rwxr-xr-x | scripts/clean-old.sh | 2 | ||||
-rwxr-xr-x | scripts/dep-update | 2 | ||||
-rwxr-xr-x | scripts/dev-dep-update | 2 | ||||
-rw-r--r-- | scripts/release.sh | 2 | ||||
-rwxr-xr-x | scripts/relocate.sh | 2 |
6 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set configurations that will be "sticky" on this system, # surviving npm self-updates. diff --git a/scripts/clean-old.sh b/scripts/clean-old.sh index cda80f2f4..32a203e4a 100755 --- a/scripts/clean-old.sh +++ b/scripts/clean-old.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # look for old 0.x cruft, and get rid of it. # Should already be sitting in the npm folder. diff --git a/scripts/dep-update b/scripts/dep-update index 52abd518c..006de17c7 100755 --- a/scripts/dep-update +++ b/scripts/dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add node_modules package.json package-lock.json &&\ diff --git a/scripts/dev-dep-update b/scripts/dev-dep-update index c8c960475..cb0b783a8 100755 --- a/scripts/dev-dep-update +++ b/scripts/dev-dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save --save-dev $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add package.json package-lock.json &&\ diff --git a/scripts/release.sh b/scripts/release.sh index 705f21502..e071c7ede 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # script for creating a zip and tarball for inclusion in node diff --git a/scripts/relocate.sh b/scripts/relocate.sh index b7483f296..ff40f857a 100755 --- a/scripts/relocate.sh +++ b/scripts/relocate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Change the cli shebang to point at the specified node # Useful for when the program is moved around after install. |