Merge pull request #498 from xgqt/2024-refactor-scripts-bash

build: minor tweaks
This commit is contained in:
leo 2024-09-23 09:24:12 +08:00 committed by GitHub
commit b6770ca36a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 10 deletions

View file

@ -1,13 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o
set -u
set pipefail
if [ -z "$VERSION" ]; then
if [[ -z "$VERSION" ]]; then
echo "Provide the version as environment variable VERSION"
exit 1
fi
if [ -z "$RUNTIME" ]; then
if [[ -z "$RUNTIME" ]]; then
echo "Provide the runtime as environment variable RUNTIME"
exit 1
fi
@ -33,7 +36,7 @@ APPIMAGETOOL_URL=https://github.com/AppImage/appimagetool/releases/download/cont
cd build
if [ ! -f "appimagetool" ]; then
if [[ ! -f "appimagetool" ]]; then
curl -o appimagetool -L "$APPIMAGETOOL_URL"
chmod +x appimagetool
fi

View file

@ -1,13 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o
set -u
set pipefail
if [ -z "$VERSION" ]; then
if [[ -z "$VERSION" ]]; then
echo "Provide the version as environment variable VERSION"
exit 1
fi
if [ -z "$RUNTIME" ]; then
if [[ -z "$RUNTIME" ]]; then
echo "Provide the runtime as environment variable RUNTIME"
exit 1
fi

View file

@ -1,13 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -o
set -u
set pipefail
if [ -z "$VERSION" ]; then
if [[ -z "$VERSION" ]]; then
echo "Provide the version as environment variable VERSION"
exit 1
fi
if [ -z "$RUNTIME" ]; then
if [[ -z "$RUNTIME" ]]; then
echo "Provide the runtime as environment variable RUNTIME"
exit 1
fi