Explorar o código

Initial commit

oscarleiva %!s(int64=6) %!d(string=hai) anos
achega
68d821f592
Modificáronse 3 ficheiros con 58 adicións e 0 borrados
  1. 1 0
      .gitignore
  2. 0 0
      README.md
  3. 57 0
      install.sh

+ 1 - 0
.gitignore

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

+ 0 - 0
README.md


+ 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 $*
+
+