Skip to content

Commit

Permalink
tools: lint osx shell scripts
Browse files Browse the repository at this point in the history
PR-URL: #42712
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
LiviaMedeiros authored and danielleadams committed Jun 27, 2022
1 parent 41c18e3 commit a4fd0af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tools/macos-firewall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# popups asking to accept incoming network connections when
# running tests.
SFW="/usr/libexec/ApplicationFirewall/socketfilterfw"
TOOLSDIR="`dirname \"$0\"`"
TOOLSDIR="`( cd \"$TOOLSDIR\" && pwd) `"
ROOTDIR="`( cd \"$TOOLSDIR/..\" && pwd) `"
TOOLSDIR="$(dirname "$0")"
TOOLSDIR="$(cd "$TOOLSDIR" && pwd)"
ROOTDIR="$(cd "$TOOLSDIR/.." && pwd)"
OUTDIR="$TOOLSDIR/../out"
# Using cd and pwd here so that the path used for socketfilterfw does not
# contain a '..', which seems to cause the rules to be incorrectly added
# and they are not removed when this script is re-run. Instead the new
# rules are simply appended. By using pwd we can get the full path
# without '..' and things work as expected.
OUTDIR="`( cd \"$OUTDIR\" && pwd) `"
OUTDIR="$(cd "$OUTDIR" && pwd)"
NODE_RELEASE="$OUTDIR/Release/node"
NODE_DEBUG="$OUTDIR/Debug/node"
NODE_LINK="$ROOTDIR/node"
Expand Down
3 changes: 1 addition & 2 deletions tools/osx-notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ if [ ! -f "${gon_exe}" ]; then
(cd "${HOME}/.gon/" && rm -f gon && unzip "${gon_exe}.zip" && mv gon "${gon_exe}")
fi

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

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

0 comments on commit a4fd0af

Please sign in to comment.