Procházet zdrojové kódy

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

Skylsmoi před 5 roky
rodič
revize
bdaf7085e9
1 změnil soubory, kde provedl 19 přidání a 10 odebrání
  1. 19 10
      first_install_frontend.sh

build_tracim_frontend.sh → first_install_frontend.sh Zobrazit soubor

@@ -1,8 +1,12 @@
1
-#!/usr/bin/env bash
1
+#!/bin/bash
2
+
3
+windoz=""
4
+if  [[ $1 = "-w" ]]; then
5
+    windoz="windoz"
6
+fi
7
+
2 8
 function log {
3
-    echo ""
4
-    echo ">> $ $1"
5
-    echo ""
9
+    echo -e "\n>> $ $1\n"
6 10
 }
7 11
 
8 12
 log "cd frontend_lib"
@@ -11,8 +15,8 @@ log "npm i"
11 15
 npm i
12 16
 log "npm link"
13 17
 npm link
14
-log "npm run buildtracimlib"
15
-npm run buildtracimlib
18
+log "npm run buildtracimlib$windoz"
19
+npm run buildtracimlib$windoz
16 20
 cd -
17 21
 
18 22
 log "cd frontend_app_html-document"
@@ -21,8 +25,8 @@ log "npm i"
21 25
 npm i
22 26
 log "npm link tracim_frontend_lib"
23 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 30
 log "cp dist/html-document.app.js"
27 31
 cp dist/html-document.app.js ../frontend/dist/app
28 32
 cd -
@@ -33,5 +37,10 @@ log "npm i"
33 37
 npm i
34 38
 log "npm link tracim_frontend_lib"
35 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