diff --git a/tools/update-cares.sh b/tools/update-cares.sh index 470a5d18a4f07f..f20347d88274fe 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 a34a19f0ffe610..12772e18e23eb9 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 2f5368e3964b1e..dafa872385b005 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 9dfb3353bca25f..e4381ecfae0948 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