Skip to content

Commit

Permalink
shebang: changed scripts shebang to better support systems like bsd a…
Browse files Browse the repository at this point in the history
…nd nixos
  • Loading branch information
lromor committed Feb 12, 2025
1 parent e55d9c4 commit 5b11bac
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cc/private/toolchain/build_interface_so
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ $# != 2 ]]; then
echo "Usage: $0 <so> <interface so>" 1>&2
Expand Down
2 changes: 1 addition & 1 deletion cc/private/toolchain/gcc_deps_scanner_wrapper.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Ship the environment to the C++ action
#
Expand Down
2 changes: 1 addition & 1 deletion cc/private/toolchain/generate_system_module_map.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion cc/private/toolchain/grep-includes.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2018 The Bazel Authors. All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion cc/private/toolchain/link_dynamic_library.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2016 The Bazel Authors. All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion cc/private/toolchain/linux_cc_wrapper.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 cc/private/toolchain/osx_cc_wrapper.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 cc/system_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _get_list_from_env_var(repo_ctx, var_name, key):
return _split_env_var(repo_ctx, var_name).get(key, default = [])

def _execute_bash(repo_ctx, cmd):
return repo_ctx.execute(["/bin/bash", "-c", cmd]).stdout.strip("\n")
return repo_ctx.execute(["/usr/bin/env bash", "-c", cmd]).stdout.strip("\n")

def _find_linker(repo_ctx):
ld = _execute_bash(repo_ctx, "which ld")
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_toolchain/sample_compiler
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Sample script demonstrating custom C++ toolchain selection: handles
# the command that translates a cc_library's .cc (source file) into .o (object
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_toolchain/sample_linker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Sample script demonstrating custom C++ toolchain selection: handles
# the command that translates a cc_library's .o (object file) into
Expand Down
2 changes: 1 addition & 1 deletion tests/rule_based_toolchain/testdata/bin
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "Running unwrapped tool"
2 changes: 1 addition & 1 deletion tests/rule_based_toolchain/testdata/bin_wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "Running tool wrapper"
4 changes: 2 additions & 2 deletions tests/system_library/unittest.bash
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 All @@ -21,7 +21,7 @@
# A typical test suite looks like so:
#
# ------------------------------------------------------------------------
# #!/bin/bash
# #!/usr/bin/env bash
#
# source path/to/unittest.bash || exit 1
#
Expand Down

0 comments on commit 5b11bac

Please sign in to comment.