diff options
author | Luigi Pinca <luigipinca@gmail.com> | 2022-11-09 17:17:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 17:17:44 +0300 |
commit | 01e673c7f6f85edfb81c135895380dfd7d70e02c (patch) | |
tree | 83f72f215f49a769f62d0d2126caa0848c908559 /tools | |
parent | aed55df74b448438a9b786f0a5d52ad629974472 (diff) |
tools: allow scripts to run from anywhere
Make the `update-cares.sh`, `update-llhttp.sh`, `update-nghttp2.sh`,
and `update-npm.sh` scripts work even if they are run outside of the
`tools` directory.
PR-URL: https://github.com/nodejs/node/pull/45361
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/update-cares.sh | 2 | ||||
-rwxr-xr-x | tools/update-llhttp.sh | 2 | ||||
-rwxr-xr-x | tools/update-nghttp2.sh | 2 | ||||
-rwxr-xr-x | tools/update-npm.sh | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tools/update-cares.sh b/tools/update-cares.sh index 470a5d18a4f..f20347d8827 100755 --- a/tools/update-cares.sh +++ b/tools/update-cares.sh @@ -2,7 +2,7 @@ set -e # Shell script to update c-ares in the source tree to a specific version -BASE_DIR="$( pwd )" +BASE_DIR=$(cd "$(dirname "$0")/.." && pwd) DEPS_DIR="$BASE_DIR/deps" ARES_VERSION=$1 diff --git a/tools/update-llhttp.sh b/tools/update-llhttp.sh index a34a19f0ffe..12772e18e23 100755 --- a/tools/update-llhttp.sh +++ b/tools/update-llhttp.sh @@ -3,7 +3,7 @@ set -e # Shell script to update llhttp in the source tree to specific version -BASE_DIR="$( pwd )" +BASE_DIR=$(cd "$(dirname "$0")/.." && pwd) DEPS_DIR="${BASE_DIR}/deps" LLHTTP_VERSION="$1" diff --git a/tools/update-nghttp2.sh b/tools/update-nghttp2.sh index 2f5368e3964..dafa872385b 100755 --- a/tools/update-nghttp2.sh +++ b/tools/update-nghttp2.sh @@ -2,7 +2,7 @@ set -e # Shell script to update nghttp2 in the source tree to specific version -BASE_DIR="$( pwd )" +BASE_DIR=$(cd "$(dirname "$0")/.." && pwd) DEPS_DIR="$BASE_DIR/deps" NGHTTP2_VERSION=$1 diff --git a/tools/update-npm.sh b/tools/update-npm.sh index 9dfb3353bca..e4381ecfae0 100755 --- a/tools/update-npm.sh +++ b/tools/update-npm.sh @@ -2,7 +2,7 @@ set -e # Shell script to update npm in the source tree to a specific version -BASE_DIR="$( pwd )" +BASE_DIR=$(cd "$(dirname "$0")/.." && pwd) DEPS_DIR="$BASE_DIR/deps" NPM_VERSION=$1 |