Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2020-11-14 20:30:45 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2020-12-05 01:56:13 +0300
commit897307554a6391035566731b9755458dda04e32f (patch)
tree0fec2fe2145e6bb7a83d60a424fb49035648eb48 /tools/osx-notarize.sh
parent1729ba7578483381bdf97e31a9f85c57aeb00fac (diff)
tools: remove bashisms from macOS release scripts
PR-URL: https://github.com/nodejs/node/pull/36121 Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'tools/osx-notarize.sh')
-rwxr-xr-xtools/osx-notarize.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/osx-notarize.sh b/tools/osx-notarize.sh
index 97bb0912722..07d3e20e7e9 100755
--- a/tools/osx-notarize.sh
+++ b/tools/osx-notarize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Uses gon, from https://github.com/mitchellh/gon, to notarize a generated node-<version>.pkg file
# with Apple for installation on macOS Catalina and later as validated by Gatekeeper.
@@ -8,18 +8,16 @@ set -e
gon_version="0.2.2"
gon_exe="${HOME}/.gon/gon_${gon_version}"
-__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pkgid="$1"
-if [ "X${pkgid}" == "X" ]; then
- echo "Usage: $0 <pkgid>"
+[ -z "$pkgid" ] && \
+ echo "Usage: $0 <pkgid>" \
exit 1
-fi
-if [ "X$NOTARIZATION_ID" == "X" ]; then
- echo "No NOTARIZATION_ID environment var. Skipping notarization."
+# shellcheck disable=SC2154
+[ -z "$NOTARIZATION_ID" ] && \
+ echo "No NOTARIZATION_ID environment var. Skipping notarization." \
exit 0
-fi
set -x