#!/usr/bin/env bash read -p "Please choose cloning method (1. SSH or 2. HTTPS) " method echo "Cloning via $method" if [ $method = "1" ] then POSTFIX="ssh" elif [ $method = "2" ] then # read -p "Please enter Gitlab user name [often, firstname.name] " USER POSTFIX="https" else echo Please enter 1 or 2 exit 1 fi DIR=polyphemus-git CWD=`pwd` if [ -d $DIR ]; then echo Directory $DIR already exists. Please remove it or choose another directory. exit 1 fi function clone_https { cd $CWD git clone https://gitlab.com/polyphemus/$1.git $2 } function clone_ssh { cd $CWD git clone git@gitlab.com:polyphemus/$1.git $2 } clone_$POSTFIX core $DIR clone_$POSTFIX atmodata $DIR/include/AtmoData clone_$POSTFIX seldondata $DIR/include/SeldonData clone_$POSTFIX talos $DIR/include/Talos clone_$POSTFIX aerosol $DIR/include/modules/aerosol clone_$POSTFIX atmopy $DIR/include/atmopy clone_$POSTFIX spack $DIR/include/spack clone_$POSTFIX test_utils $DIR/include/test_utils