Skip to content

Commit

Permalink
Use /usr/bin/env as shebang everywhere
Browse files Browse the repository at this point in the history
It's not guaranteed that bash will be available at /bin/bash; it's even
less likely that node will always be installed at /usr/bin/node{,js}.
Always indirecting through /usr/bin/env means that there is only one
such path that needs to be available.
  • Loading branch information
sersorrel committed Aug 17, 2022
1 parent fa8b20f commit 5a6b37f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/apploader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/nodejs
#!/usr/bin/env nodejs
/* Simple Command-line app loader for Node.js
===============================================
Expand Down
2 changes: 1 addition & 1 deletion bin/create_app_supports_field.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/nodejs
#!/usr/bin/env nodejs
/* Quick hack to add proper 'supports' field to apps.json
*/

Expand Down
2 changes: 1 addition & 1 deletion bin/create_apps_json.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# ================================================================
# apps.json used to contain the metadata for every app. Now the
# metadata is stored in each apps's directory - app/yourapp/metadata.js
Expand Down
2 changes: 1 addition & 1 deletion bin/firmwaremaker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/nodejs
#!/usr/bin/env nodejs
/*
Mashes together a bunch of different apps to make
a single firmware JS file which can be uploaded.
Expand Down
2 changes: 1 addition & 1 deletion bin/firmwaremaker_c.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/node
#!/usr/bin/env node
/*
Mashes together a bunch of different apps into a big binary blob.
We then store this *inside* the Bangle.js firmware and can use it
Expand Down
2 changes: 1 addition & 1 deletion bin/pre-publish.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd `dirname $0`/..
nodejs bin/sanitycheck.js || exit 1
Expand Down
2 changes: 1 addition & 1 deletion bin/sanitycheck.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/node
#!/usr/bin/env node
/* Checks for any obvious problems in apps.json
*/

Expand Down
2 changes: 1 addition & 1 deletion bin/thumbnailer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/node
#!/usr/bin/env node

/*
var EMULATOR = "banglejs2";
Expand Down
2 changes: 1 addition & 1 deletion tests/Layout/bin/runalltests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd `dirname $0`/..
ls tests/*.js | xargs -I{} bin/runtest.sh {}
2 changes: 1 addition & 1 deletion tests/Layout/bin/runtest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Requires Linux x64 (for ./espruino)
# Also imagemagick for display

Expand Down

0 comments on commit 5a6b37f

Please sign in to comment.