Skip to content

Commit 30934e4

Browse files
tools: lint osx shell scripts
PR-URL: nodejs#42712 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 19064be commit 30934e4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tools/macos-firewall.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
# popups asking to accept incoming network connections when
44
# running tests.
55
SFW="/usr/libexec/ApplicationFirewall/socketfilterfw"
6-
TOOLSDIR="`dirname \"$0\"`"
7-
TOOLSDIR="`( cd \"$TOOLSDIR\" && pwd) `"
8-
ROOTDIR="`( cd \"$TOOLSDIR/..\" && pwd) `"
6+
TOOLSDIR="$(dirname "$0")"
7+
TOOLSDIR="$(cd "$TOOLSDIR" && pwd)"
8+
ROOTDIR="$(cd "$TOOLSDIR/.." && pwd)"
99
OUTDIR="$TOOLSDIR/../out"
1010
# Using cd and pwd here so that the path used for socketfilterfw does not
1111
# contain a '..', which seems to cause the rules to be incorrectly added
1212
# and they are not removed when this script is re-run. Instead the new
1313
# rules are simply appended. By using pwd we can get the full path
1414
# without '..' and things work as expected.
15-
OUTDIR="`( cd \"$OUTDIR\" && pwd) `"
15+
OUTDIR="$(cd "$OUTDIR" && pwd)"
1616
NODE_RELEASE="$OUTDIR/Release/node"
1717
NODE_DEBUG="$OUTDIR/Debug/node"
1818
NODE_LINK="$ROOTDIR/node"

tools/osx-notarize.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ if [ ! -f "${gon_exe}" ]; then
2828
(cd "${HOME}/.gon/" && rm -f gon && unzip "${gon_exe}.zip" && mv gon "${gon_exe}")
2929
fi
3030

31-
cat tools/osx-gon-config.json.tmpl \
32-
| sed -e "s/{{appleid}}/${NOTARIZATION_ID}/" -e "s/{{pkgid}}/${pkgid}/" \
31+
sed -e "s/{{appleid}}/${NOTARIZATION_ID}/" -e "s/{{pkgid}}/${pkgid}/" tools/osx-gon-config.json.tmpl \
3332
> gon-config.json
3433

3534
"${gon_exe}" -log-level=info gon-config.json

0 commit comments

Comments
 (0)