Files
Linux.js---javascript-OS/nodejs/build.sh
T

29 lines
569 B
Bash
Executable File

#!/bin/bash
if [ "$EUID" = 0 ]
then echo "Please don't run this as root"
exit
fi
export VERSION=17.6.0
if [ ! -f src/node-$VERSION/Makefile ]
then
mkdir src -p
cd src
echo "clonning"
curl https://github.com/nodejs/node/archive/refs/tags/v$VERSION.zip -L --output $VERSION.zip || exit 1
unzip $VERSION.zip || exit 1
cd -
./patch.sh || exit 1
fi
echo "building"
#privilégier les lib interne a l'os
cd src/node-$VERSION
./configure --prefix=/usr || exit 1
make -j$(nproc) || exit 1
cd -
sudo src/node-$VERSION/tools/install.py install $(pwd)/../rootfs || exit 1