@@ -9,6 +9,9 @@ DEPS_DIR="${BASE_DIR}/deps"
99[ -z " $NODE " ] && NODE=" $BASE_DIR /out/Release/node"
1010[ -x " $NODE " ] || NODE=$( command -v node)
1111
12+ # shellcheck disable=SC1091
13+ . " $BASE_DIR /tools/dep_updaters/utils.sh"
14+
1215NEW_VERSION=" $( " $NODE " --input-type=module << 'EOF '
1316const res = await fetch('https://api.github.com/repos/nodejs/llhttp/releases/latest');
1417if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
@@ -52,19 +55,20 @@ if echo "$NEW_VERSION" | grep -qs "/" ; then # Download a release
5255 echo " Checking out branch $BRANCH ..."
5356 git checkout " $BRANCH "
5457
55- echo " Building llhtttp ..."
58+ echo " Building llhttp ..."
5659 npm install
5760 make release
5861
59- echo " Copying llhtttp release ..."
62+ echo " Copying llhttp release ..."
6063 rm -rf " $DEPS_DIR /llhttp"
6164 cp -a release " $DEPS_DIR /llhttp"
6265else
6366 echo " Download llhttp release $NEW_VERSION ..."
64- curl -sL -o llhttp.tar.gz " https://github.com/nodejs/llhttp/archive/refs/tags/release/v$NEW_VERSION .tar.gz"
65- gzip -dc llhttp.tar.gz | tar xf -
67+ LLHTTP_TARBALL=" llhttp-v$NEW_VERSION .tar.gz"
68+ curl -sL -o " $LLHTTP_TARBALL " " https://github.com/nodejs/llhttp/archive/refs/tags/release/v$NEW_VERSION .tar.gz"
69+ gzip -dc " $LLHTTP_TARBALL " | tar xf -
6670
67- echo " Copying llhtttp release ..."
71+ echo " Copying llhttp release ..."
6872 rm -rf " $DEPS_DIR /llhttp"
6973 cp -a " llhttp-release-v$NEW_VERSION " " $DEPS_DIR /llhttp"
7074fi
0 commit comments