Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shebang: changed scripts shebang to better support systems like bsd and nixos #306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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