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
path: root/tools
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2022-11-09 17:17:44 +0300
committerGitHub <noreply@github.com>2022-11-09 17:17:44 +0300
commit01e673c7f6f85edfb81c135895380dfd7d70e02c (patch)
tree83f72f215f49a769f62d0d2126caa0848c908559 /tools
parentaed55df74b448438a9b786f0a5d52ad629974472 (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-xtools/update-cares.sh2
-rwxr-xr-xtools/update-llhttp.sh2
-rwxr-xr-xtools/update-nghttp2.sh2
-rwxr-xr-xtools/update-npm.sh2
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