You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# curl -sL -o node.tgz https://nodejs.org/download/release/latest-dubnium/$f 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null
460
-
curl -sSL -o /tmp/node.tgz https://unofficial-builds.nodejs.org/download/release/v$tgta/node-v$tgta-linux-armv6l.tar.gz 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
461
-
# unpack it into the correct places
462
-
hd=$(head -c 6 /tmp/node.tgz)
463
-
if [ "$hd"=="<!DOCT" ] || [ "$hd"=="<html>" ];then
464
-
CHAR="$CROSS File $f not downloaded";
465
-
else
466
-
if [[ -d /tmp/nodejs ]];then
467
-
$SUDO rm -rf /tmp/nodejs
461
+
if [[ "$tgta"!="None" ]];then
462
+
$SUDO apt remove -y nodejs nodejs-legacy npm 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
# curl -sL -o node.tgz https://nodejs.org/download/release/latest-dubnium/$f 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null
468
+
curl -sSL -o /tmp/node.tgz https://unofficial-builds.nodejs.org/download/release/v$tgta/node-v$tgta-linux-armv6l.tar.gz 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
469
+
# unpack it into the correct places
470
+
hd=$(head -c 6 /tmp/node.tgz)
471
+
if [ "$hd"=="<!DOCT" ] || [ "$hd"=="<html>" ];then
472
+
CHAR="$CROSS File $f not downloaded";
473
+
else
474
+
if [[ -d /tmp/nodejs ]];then
475
+
$SUDO rm -rf /tmp/nodejs
476
+
fi
477
+
mkdir -p /tmp/nodejs
478
+
$SUDO tar -zxof /tmp/node.tgz --strip-components=1 -C /tmp/nodejs
479
+
$SUDO chown -R 0:0 /tmp/nodejs 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
480
+
if$SUDO cp -PR /tmp/nodejs/* /usr/ 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null;then CHAR=$TICK;else CHAR=$CROSS;fi
481
+
$SUDO rm -rf /tmp/nodejs 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
468
482
fi
469
-
mkdir -p /tmp/nodejs
470
-
$SUDO tar -zxof /tmp/node.tgz --strip-components=1 -C /tmp/nodejs
471
-
$SUDO chown -R 0:0 /tmp/nodejs 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
472
-
if$SUDO cp -PR /tmp/nodejs/* /usr/ 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null;then CHAR=$TICK;else CHAR=$CROSS;fi
473
-
$SUDO rm -rf /tmp/nodejs 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
483
+
# remove the tgz file to save space
484
+
rm /tmp/node.tgz 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
485
+
echo -ne " Install Node.js for Armv6 $CHAR"
486
+
else
487
+
echo -ne " Nodejs "$tgta" for Armv6 does not exist $CROSS"
474
488
fi
475
-
# remove the tgz file to save space
476
-
rm /tmp/node.tgz 2>&1|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
477
-
echo -ne " Install Node.js for Armv6 $CHAR"
478
489
else
479
490
echo"Installing nodejs $NODE_VERSION"|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
480
491
# clean out old nodejs stuff
@@ -566,6 +577,7 @@ case $yn in
566
577
# install any nodes, that were installed globally, as local instead
567
578
echo"Now create basic package.json for the user and move any global nodes"|$SUDO tee -a /var/log/nodered-install.log >>/dev/null
0 commit comments