Skip to content

Commit

Permalink
Fail on all errors in Bash scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Nov 22, 2019
1 parent a3aeca9 commit aae895b
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 20 deletions.
3 changes: 2 additions & 1 deletion build-docker-image.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

cd docker

Expand Down
10 changes: 7 additions & 3 deletions ci/azure-install-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

steps:
- bash: |
set -e
set -euo pipefail
if command -v rustup; then
echo `command -v rustup` `rustup -V` already installed
rustup self update
Expand All @@ -17,13 +18,16 @@ steps:
displayName: Install rustup
- bash: |
set -e
set -euo pipefail
rustup update $TOOLCHAIN
rustup default $TOOLCHAIN
displayName: Install rust
- bash: |
set -ex
set -x
set -euo pipefail
rustup -V
rustc -Vv
cargo -V
Expand Down
3 changes: 2 additions & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

function retry {
local tries=${TRIES-5}
Expand Down
3 changes: 2 additions & 1 deletion docker/android-ndk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

NDK_URL=https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip

Expand Down
3 changes: 2 additions & 1 deletion docker/android-system.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local arch=$1
Expand Down
3 changes: 2 additions & 1 deletion docker/cmake.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local version=3.5.1
Expand Down
3 changes: 2 additions & 1 deletion docker/common.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

apt-get update

Expand Down
3 changes: 2 additions & 1 deletion docker/dragonfly.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local binutils=2.25.1 \
Expand Down
3 changes: 2 additions & 1 deletion docker/dropbear.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local version=2019.78 \
Expand Down
2 changes: 1 addition & 1 deletion docker/emscripten-entry.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -euo pipefail

export HOME=/emsdk-portable/

Expand Down
3 changes: 2 additions & 1 deletion docker/emscripten.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local dependencies=(
Expand Down
3 changes: 2 additions & 1 deletion docker/freebsd.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local arch=$1
Expand Down
3 changes: 2 additions & 1 deletion docker/linux-image.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
# arch in the rust target
Expand Down
3 changes: 2 additions & 1 deletion docker/musl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

hide_output() {
set +x
Expand Down
3 changes: 2 additions & 1 deletion docker/netbsd.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local binutils=2.25.1 \
Expand Down
3 changes: 2 additions & 1 deletion docker/qemu.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local version=4.1.0
Expand Down
3 changes: 2 additions & 1 deletion docker/solaris.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local arch=$1
Expand Down
3 changes: 2 additions & 1 deletion docker/xargo.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -ex
set -x
set -euo pipefail

main() {
local dependencies=(
Expand Down

0 comments on commit aae895b

Please sign in to comment.