oscarleiva 6 лет назад
Сommit
68d821f592
3 измененных файлов с 58 добавлено и 0 удалено
  1. 1 0
      .gitignore
  2. 0 0
      README.md
  3. 57 0
      install.sh

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+denmark/


+ 57 - 0
install.sh

@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# Make the script exit on any error
+set -e
+set -o errexit
+DEBIAN_FRONTEND=noninteractive
+
+FRONTEND="ssh://git@git.grupomerelec.com:10022/onunez/soma-frontend.git"
+BACKEND="ssh://git@git.grupomerelec.com:10022/MERELEC/ME_EMS_API.git"
+
+
+
+function main {
+    args=$1
+    if [ -z $args ]; then
+        echo 'usage: install [<opions>]
+            install: try ''`install --help`'' for more information
+        '
+
+        exit
+
+    fi
+
+    if [ $args = '--help' ]; then
+        echo 'usage: install [<opions>]
+
+        Options:
+            --dev       Install from development branch of repos
+            --prod      Install from master branch of repos
+            --help      This help
+            '
+        exit
+    fi
+
+    # Se crean las carpetas en donde se clonarán los repositorios
+    mkdir ./denmark
+    cd ./denmark
+
+
+    # Clone repositorires
+
+    git clone $FRONTEND frontend
+    git clone $BACKEND backend
+
+    if [ $args = '--dev' ]; then
+
+        cd frontend && git checkout development && cd ..
+        cd backend && git checkout develop && cd ..
+
+    fi
+
+}
+
+
+main $*
+
+