Skip to content

Commit 55db124

Browse files
committed
refactor: use "bash strict mode"
1 parent 4c5e305 commit 55db124

3 files changed

Lines changed: 21 additions & 9 deletions

File tree

script/cibuild

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

3-
set -eux
3+
set -Eeuo pipefail
4+
IFS=$'\n\t'
45

5-
cd "$(dirname "${0}")/../"
6+
HERE="$(cd "$(dirname "$0")" && pwd)"
7+
TOP_LEVEL="$(cd "$HERE/../" && pwd)"
68

7-
TOP_LEVEL="$(pwd)"
9+
cd "$TOP_LEVEL"
810

911
# Build
1012
if [ -x "$(which xcpretty)" ]; then

script/crop-screenshot

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

3-
cd "$(dirname "${0}")/../"
3+
set -Eeuo pipefail
4+
IFS=$'\n\t'
5+
6+
HERE="$(cd "$(dirname "$0")" && pwd)"
7+
TOP_LEVEL="$(cd "$HERE/../" && pwd)"
8+
9+
cd "$TOP_LEVEL"
410

511
gm mogrify -crop 1280x800+1660 *.png

script/format

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

3-
set -eu
3+
set -Eeuo pipefail
4+
IFS=$'\n\t'
45

5-
cd "$(dirname "${0}")/../"
6+
HERE="$(cd "$(dirname "$0")" && pwd)"
7+
TOP_LEVEL="$(cd "$HERE/../" && pwd)"
8+
9+
cd "$TOP_LEVEL"
610

711
git ls-files -z '*.swift' | xargs -0 swift-format format -i

0 commit comments

Comments
 (0)