diff options
author | Livia Medeiros <74449973+LiviaMedeiros@users.noreply.github.com> | 2022-04-15 01:08:55 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:56:08 +0300 |
commit | 18ae2c39d53bebf55349ca5cf8317633c64ccf79 (patch) | |
tree | b165780e3d275328c887c47306f0769292e7e308 /tools | |
parent | d652b5fbdb1074d4f1dbb5c50abfc4c82be1362c (diff) |
tools: lint osx shell scripts
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/macos-firewall.sh | 8 | ||||
-rwxr-xr-x | tools/osx-notarize.sh | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tools/macos-firewall.sh b/tools/macos-firewall.sh index b6050aaf345..4dfa849bc3a 100755 --- a/tools/macos-firewall.sh +++ b/tools/macos-firewall.sh @@ -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" diff --git a/tools/osx-notarize.sh b/tools/osx-notarize.sh index 07d3e20e7e9..31c92c2ca42 100755 --- a/tools/osx-notarize.sh +++ b/tools/osx-notarize.sh @@ -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 |