Skip to content

Commit

Permalink
Use /usr/bin/env bash for more portable shebang lines (#381)
Browse files Browse the repository at this point in the history
There are still systems widely in use where bash does not exist at
/bin/bash (e.g. NixOS), or where /bin/bash is an extremely outdated
version of bash (MacOS).  Using /usr/bin/env to find it increases
portability.  It's not hermetic, but /bin/bash was already not
hermetic.
  • Loading branch information
benley authored and erain committed May 9, 2018
1 parent 2c7a3e6 commit e5ebe3d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion container/incremental_load.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2015 The Bazel Authors. All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion container/push-tag.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion container/testenv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Bazel Authors. All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion contrib/push-all.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion contrib/structure-test.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
4 changes: 2 additions & 2 deletions testing/e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -e

#!/usr/bin/env bash
set -e
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion update_deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit e5ebe3d

Please sign in to comment.