Skip to content

Commit 6461765

Browse files
committed
build: minor tweaks
* call bash through env progrem * add more strict defaults * [ -> [[ Signed-off-by: Maciej Barć <[email protected]>
1 parent 67b3952 commit 6461765

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

build/scripts/package.linux.sh

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

33
set -e
4+
set -o
5+
set -u
6+
set pipefail
47

5-
if [ -z "$VERSION" ]; then
8+
if [[ -z "$VERSION" ]]; then
69
echo "Provide the version as environment variable VERSION"
710
exit 1
811
fi
912

10-
if [ -z "$RUNTIME" ]; then
13+
if [[ -z "$RUNTIME" ]]; then
1114
echo "Provide the runtime as environment variable RUNTIME"
1215
exit 1
1316
fi
@@ -33,7 +36,7 @@ APPIMAGETOOL_URL=https://github.com/AppImage/appimagetool/releases/download/cont
3336

3437
cd build
3538

36-
if [ ! -f "appimagetool" ]; then
39+
if [[ ! -f "appimagetool" ]]; then
3740
curl -o appimagetool -L "$APPIMAGETOOL_URL"
3841
chmod +x appimagetool
3942
fi

build/scripts/package.osx-app.sh

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

33
set -e
4+
set -o
5+
set -u
6+
set pipefail
47

5-
if [ -z "$VERSION" ]; then
8+
if [[ -z "$VERSION" ]]; then
69
echo "Provide the version as environment variable VERSION"
710
exit 1
811
fi
912

10-
if [ -z "$RUNTIME" ]; then
13+
if [[ -z "$RUNTIME" ]]; then
1114
echo "Provide the runtime as environment variable RUNTIME"
1215
exit 1
1316
fi

build/scripts/package.windows-portable.sh

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

33
set -e
4+
set -o
5+
set -u
6+
set pipefail
47

5-
if [ -z "$VERSION" ]; then
8+
if [[ -z "$VERSION" ]]; then
69
echo "Provide the version as environment variable VERSION"
710
exit 1
811
fi
912

10-
if [ -z "$RUNTIME" ]; then
13+
if [[ -z "$RUNTIME" ]]; then
1114
echo "Provide the runtime as environment variable RUNTIME"
1215
exit 1
1316
fi

0 commit comments

Comments
 (0)