From fc5cd0723395cb466fd9d0225d13d8ca884f0e44 Mon Sep 17 00:00:00 2001
From: Francois B <shakasan@sirenacorp.be>
Date: Sat, 19 May 2018 06:18:44 +0200
Subject: [PATCH] add nodejs trtfct to remove craps from ubuntu officiel
 version of node

---
 repo_functions.sh | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/repo_functions.sh b/repo_functions.sh
index 213ebe6..0a9ded1 100644
--- a/repo_functions.sh
+++ b/repo_functions.sh
@@ -1178,11 +1178,25 @@ AppsTrtFct="nitrogen;nitrogen_TrtFct
 mongodb;mongodb_TrtFct
 qttools5-dev-tools;qt_TrtFct
 plank;plank_TrtFct
-androidstudio;android_TrtFct"
+androidstudio;android_TrtFct
+nodejs8lts;nodejs8lts_TrtFct"
 
 #
 #
 #
+function nodejs8lts_TrtFct () {
+  msg "Sanitizing NodeJS install"
+  if which /usr/local/bin/node >/dev/null; then
+    runCmd "sudo rm /usr/local/bin/node" \
+           "cleaning/removing legacy node files"
+  else
+    print "[INFO] nothing to clean, good :-)"
+  fi
+}
+
+#
+# Android Env for adb, fastboot, ....
+#
 function android_TrtFct () {
   msg "Adding Android devices UDEV rules"