Add Node.js app
parent
bad701e0e1
commit
c0948e8da8
@ -0,0 +1,2 @@
|
|||||||
|
script by ilobilo
|
||||||
|
script improved by Itai-Nelken
|
@ -0,0 +1,2 @@
|
|||||||
|
JavaScript code outside a web browser.
|
||||||
|
Node.js is used for all npm packages and is the foundation of Electron. As usual, this app will keep it updated.
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
|
||||||
|
|
||||||
|
function error {
|
||||||
|
echo -e "\\e[91m$1\\e[39m"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#Checking if using armv6
|
||||||
|
if [ ! -z "$(cat /proc/cpuinfo | grep ARMv6)" ];then
|
||||||
|
error "armv6 cpu not supported"
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${DIRECTORY}/pkg-install" "curl" "$(dirname "$0")" || exit 1
|
||||||
|
|
||||||
|
#Add NodeSource repo:
|
||||||
|
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash - || error "Failed to add Nodesource repo!"
|
||||||
|
|
||||||
|
#Install NodeJS:
|
||||||
|
sudo apt install nodejs -y || error "Failed to install Node.JS"
|
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
|
||||||
|
|
||||||
|
function error {
|
||||||
|
echo -e "\\e[91m$1\\e[39m"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#Uninstall NodeJS
|
||||||
|
sudo apt purge nodejs -y || error "Failed to purge Node.JS!"
|
||||||
|
sudo apt autoremove -y #who cares if this fails?
|
||||||
|
|
||||||
|
#remove /etc/apt/sources.list.d/nodesource.list
|
||||||
|
sudo rm /etc/apt/sources.list.d/nodesource.list || error "Failed to remove nodesource repo!"
|
||||||
|
|
||||||
|
#if your app installs any packages, keep this command here so those packages will be removed.
|
||||||
|
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
|
@ -0,0 +1 @@
|
|||||||
|
https://nodesource.com/
|
Loading…
Reference in New Issue