Browse Source

add check if nodejs installed, if not, install nodejs

philippe 5 years ago
parent
commit
3da3c3cd65
1 changed files with 17 additions and 0 deletions
  1. 17 0
      install_frontend_dependencies.sh

+ 17 - 0
install_frontend_dependencies.sh View File

@@ -3,6 +3,23 @@
3 3
 # shellcheck disable=SC1091
4 4
 . bash_library.sh # source bash_library.sh
5 5
 
6
+# install nodjs if not installed
7
+
8
+(
9
+  log "verify if nodjs is installed"
10
+  dpkg -l | grep '^ii' | grep 'noidejs\s'
11
+
12
+  if [ $? -eq 0 ]; then
13
+    log "nodjs is installed"
14
+  else
15
+    log "install nodejs"
16
+    sudo apt install curl
17
+    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
18
+    sudo apt install -y nodejs
19
+  fi
20
+)
21
+
22
+
6 23
 # install Tracim Lib
7 24
 
8 25
 (