Backport nodejs-sources.sh from 18

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2022-07-11 10:33:52 -04:00
parent 13f0076734
commit 2d95ee0da3
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11

View File

@ -100,6 +100,12 @@ assign_positional_args 1 "${_positionals[@]}"
### END OF CODE GENERATED BY Argbash (sortof) ### ])
# [ <-- needed because of Argbash
packages=("jq" "wget" "tar" "fedpkg" "grep" "sed")
rpm -q ${packages[@]} >/dev/null
if [ $? -ne 0 ]; then
sudo dnf -y install ${packages[@]}
fi
set -e
@ -119,6 +125,9 @@ wget http://nodejs.org/dist/v${version}/node-v${version}.tar.gz \
http://nodejs.org/dist/v${version}/SHASUMS256.txt
sha256sum -c SHASUMS256.txt --ignore-missing
tar -zxf node-v${version}.tar.gz
# Remove bundled OpenSSL
# We will link to the system version
rm -rf node-v${version}/deps/openssl
tar -zcf node-v${version}-stripped.tar.gz node-v${version}