Browse Source

renamed build_tracim_frontend.sh into first_install_frontend.sh + added option -w for windows

Skylsmoi 6 years ago
parent
commit
bdaf7085e9
1 changed files with 19 additions and 10 deletions
  1. 19 10
      first_install_frontend.sh

build_tracim_frontend.sh → first_install_frontend.sh View File

1
-#!/usr/bin/env bash
1
+#!/bin/bash
2
+
3
+windoz=""
4
+if  [[ $1 = "-w" ]]; then
5
+    windoz="windoz"
6
+fi
7
+
2
 function log {
8
 function log {
3
-    echo ""
4
-    echo ">> $ $1"
5
-    echo ""
9
+    echo -e "\n>> $ $1\n"
6
 }
10
 }
7
 
11
 
8
 log "cd frontend_lib"
12
 log "cd frontend_lib"
11
 npm i
15
 npm i
12
 log "npm link"
16
 log "npm link"
13
 npm link
17
 npm link
14
-log "npm run buildtracimlib"
15
-npm run buildtracimlib
18
+log "npm run buildtracimlib$windoz"
19
+npm run buildtracimlib$windoz
16
 cd -
20
 cd -
17
 
21
 
18
 log "cd frontend_app_html-document"
22
 log "cd frontend_app_html-document"
21
 npm i
25
 npm i
22
 log "npm link tracim_frontend_lib"
26
 log "npm link tracim_frontend_lib"
23
 npm link tracim_frontend_lib
27
 npm link tracim_frontend_lib
24
-log "npm run build # for frontend_app_html-document"
25
-npm run build
28
+log "npm run build$windoz # for frontend_app_html-document"
29
+npm run build$windoz
26
 log "cp dist/html-document.app.js"
30
 log "cp dist/html-document.app.js"
27
 cp dist/html-document.app.js ../frontend/dist/app
31
 cp dist/html-document.app.js ../frontend/dist/app
28
 cd -
32
 cd -
33
 npm i
37
 npm i
34
 log "npm link tracim_frontend_lib"
38
 log "npm link tracim_frontend_lib"
35
 npm link tracim_frontend_lib
39
 npm link tracim_frontend_lib
36
-log "npm run servdev-dashboard # for frontend"
37
-npm run servdev-dashboard
40
+if [[ $1 = "-w" ]]; then
41
+    log "npm run servdev # for frontend"
42
+    npm run servdev
43
+else
44
+    log "npm run servdev-dashboard # for frontend"
45
+    npm run servdev-dashboard
46
+fi