Merge pull request #660 from yalh76/patch-1

[enh] Add the arch argument to ynh_install_nodejs
This commit is contained in:
Alexandre Aubin 2019-02-25 00:52:08 +01:00 committed by GitHub
commit fa4023283b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,13 @@ ynh_install_nodejs () {
test -x /usr/bin/npm_n && mv /usr/bin/npm_n /usr/bin/npm
# Install the requested version of nodejs
n $nodejs_version
uname=$(uname -m)
if [[ $uname =~ aarch64 || $uname =~ arm64]]
then
n $nodejs_version --arch=arm64
else
n $nodejs_version
fi
# Find the last "real" version for this major version of node.
real_nodejs_version=$(find $node_version_path/$nodejs_version* -maxdepth 0 | sort --version-sort | tail --lines=1)