Skip to content

Commit

Permalink
fix: use #!/usr/bin/env bash as shebang instead of #!/bin/bash
Browse files Browse the repository at this point in the history
This will fix running these scripts on distros without /bin/bash, but
where bash is in $PATH, such as NixOS.

Currently, `make fmt` otherwise fails to run:

```
make[3]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos'
sh: ./hack/fix-artifacts.sh: /bin/bash: bad interpreter: No such file or directory
make[2]: *** [Makefile:163: local-fmt-protobuf] Error 126
make[2]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos'
make[1]: *** [Makefile:274: fmt-protobuf] Error 2
make[1]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos'
make: *** [Makefile:277: fmt] Error 2
```

Signed-off-by: Florian Klink <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
flokli authored and smira committed Jan 25, 2022
1 parent 4464b72 commit a50c429
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion hack/cloud-image-uploader.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion hack/fix-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for platform in $(tr "," "\n" <<< "${PLATFORM}"); do
echo ${platform}
Expand Down
2 changes: 1 addition & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion hack/start-registry-proxies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Sync changes with configuring-pull-through-cache.md.

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-aws.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-azure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-capi.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-gcp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-iso.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eoux pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/e2e-qemu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eou pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/libvirt/libvirt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion hack/test/provision-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eoux pipefail

Expand Down
2 changes: 1 addition & 1 deletion hack/test/qemu/qemu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down

0 comments on commit a50c429

Please sign in to comment.