From 2d95ee0da3524c810ae10c8ace44ab186ecf03ae Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 11 Jul 2022 10:33:52 -0400 Subject: [PATCH] Backport nodejs-sources.sh from 18 Signed-off-by: Stephen Gallagher --- nodejs-sources.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nodejs-sources.sh b/nodejs-sources.sh index b1295ca..645b8c1 100755 --- a/nodejs-sources.sh +++ b/nodejs-sources.sh @@ -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}