Meta: Set 'pipefail' option correctly in shell scripts

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.
This commit is contained in:
Linus Groh 2020-12-27 15:26:43 +01:00 committed by Andreas Kling
parent 5122f98198
commit a56b3cbf7c
4 changed files with 11 additions and 7 deletions

View file

@ -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/.."

View file

@ -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/.."

View file

@ -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/.."

View file

@ -1,5 +1,6 @@
#!/bin/bash
set -e pipefail
set -eo pipefail
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."