Skip to content

Commit 60ab3d2

Browse files
committed
CI: Remove shebang from non-executable scripts
Some of our CI shell scripts are meant only to be sourced and not run directly however they include an initial shebang line, implying that they should be run. Remove the shebang line from `crates.sh` and the various `test_vars.sh` scripts. Add a `shellcheck` directive to inhibit the no-shebang warning. Fix: rust-bitcoin#2764
1 parent 3c87d0c commit 60ab3d2

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

base58/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

bitcoin/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

contrib/crates.sh

100755100644
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
#
35
# Used by labeler.yaml
46
#

hashes/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

internals/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

io/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

units/contrib/test_vars.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
24
# disable verify unused vars, despite the fact that they are used when sourced
35
# shellcheck disable=SC2034
46

0 commit comments

Comments
 (0)