Skip to content

Commit

Permalink
build: use /usr/bin/env to load bash
Browse files Browse the repository at this point in the history
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: #212
Close: #212
Reviewed-by: @isaacs
  • Loading branch information
rsmarples authored and isaacs committed Jul 10, 2019
1 parent a2ea7f9 commit f52673f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# set configurations that will be "sticky" on this system,
# surviving npm self-updates.
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean-old.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/dep-update
Original file line number Diff line number Diff line change
@@ -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 &&\
Expand Down
2 changes: 1 addition & 1 deletion scripts/dev-dep-update
Original file line number Diff line number Diff line change
@@ -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 &&\
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# script for creating a zip and tarball for inclusion in node

Expand Down
2 changes: 1 addition & 1 deletion scripts/relocate.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit f52673f

Please sign in to comment.