Skip to content

Commit

Permalink
Meta: Set 'pipefail' option correctly in shell scripts
Browse files Browse the repository at this point in the history
This needs '-o' to work correctly. Also update the shebang to bash in
some scripts as shellcheck was complaining about pipefail not being a
POSIX shell thing otherwise.
  • Loading branch information
linusg authored and awesomekling committed Dec 27, 2020
1 parent 5122f98 commit a56b3cb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Meta/lint-executable-resources.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
set -e pipefail
#!/bin/bash

set -eo pipefail

script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
Expand Down
5 changes: 3 additions & 2 deletions Meta/lint-ipc-ids.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
set -e pipefail
#!/bin/bash

set -eo pipefail

script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
Expand Down
5 changes: 3 additions & 2 deletions Meta/lint-missing-resources.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
set -e pipefail
#!/bin/bash

set -eo pipefail

script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
Expand Down
3 changes: 2 additions & 1 deletion Meta/lint-shell-scripts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e pipefail

set -eo pipefail

script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
Expand Down

0 comments on commit a56b3cb

Please sign in to comment.