#!/bin/bash

# Checkout the submodules
# usage: ./ci-scripts/checkout.sh

# to be put in ~/.gitconfig
#[credential "https://gitlab.cern.ch"]
#   username = wrci
#   helper = "!f() { test \"$1\" = get && echo \"password=$gitlabpass\"; }; f"

set -e

git submodule update --init

cd dependencies/RFNCO
sed -i -e "s|https://:@gitlab.cern.ch:8443/|https://gitlab.cern.ch/|" .gitmodules
git submodule update --init MemMap

cd MemMap
sed -i -e "s|https://:@gitlab.cern.ch:8443/|https://gitlab.cern.ch/|" .gitmodules
git submodule update --init
