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>
This commit is contained in:
Luigi Pinca 2022-11-09 15:17:44 +01:00 committed by GitHub
parent aed55df74b
commit 01e673c7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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