install-deps 817 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#!/bin/bash

DIR=$1
DEPS_DIR=${DIR}/deps

function clone_or_update() {
    REPO=$1
    echo "Checking repo ${REPO}"
    # strip only dir name from URL
    DIR=${REPO##*/}
    # strip the remaining '.git' suffix
    RAW_DIR=${DIR%.*}
    if [ -d "${RAW_DIR}" ]; then
        pushd ${RAW_DIR}
        git pull
        popd ..
    else
        git clone "$@"
    fi
}

if [ ! -d "${DEPS_DIR}" ]; then
    mkdir ${DIR}/deps
fi

cd ${DIR}/deps

clone_or_update https://gitlab.iscpif.fr/gargantext/clustering-louvain.git
clone_or_update https://github.com/np/servant-job.git
clone_or_update https://github.com/np/patches-map
clone_or_update https://gitlab.com/npouillard/patches-class.git
clone_or_update https://github.com/delanoe/haskell-opaleye
clone_or_update https://github.com/delanoe/hsparql -b next --single-branch