nodejs from source

This commit is contained in:
Marc
2021-11-30 10:57:05 +01:00
parent 952edb4270
commit 3781c5108b
8 changed files with 62 additions and 23 deletions
+1
View File
@@ -0,0 +1 @@
src
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
if [ "$EUID" = 0 ]
then echo "Please don't run this as root"
exit
fi
VERSION=17.1.0
if [ ! -f src ]
then
mkdir src -p
cd src
curl https://github.com/nodejs/node/archive/refs/tags/v$VERSION.zip -L --output $VERSION.zip || exit 1
unzip $VERSION.zip || exit 1
cd -
fi
cd src/node-$VERSION
./configure || exit 1
make -j$(nproc) || exit 1
cd -
sudo src/node-$VERSION/tools/install.py install $(pwd)/../rootfs || exit 1