#!/bin/sh set -e set -u # DEBUG set -x # clone or pull git repo _pull() { myurl="${1}" mydir_raw="$(basename "${myurl}")" mydir="${mydir_raw%.git}" mybranch="${2}" if [ -d "${mydir}" ]; then cd "${mydir}" git checkout "${mybranch}" git pull cd - else git clone -b "${mybranch}" "${myurl}" "${mydir}" fi } main() { _pull 'https://gitea.pangea.org/pangea/django-orchestra' 'sso' _pull 'https://gitea.pangea.org/pangea/django-musician' 'sso' _pull 'git@gitea.pangea.org:trustchain-oc1-orchestral/IdHub.git' 'main' _pull 'git@gitea.pangea.org:trustchain-oc1-orchestral/authentik.git' 'trustchain-oc1-orchestral' # we only use this to get idhub dependency # didkit-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl _pull 'git@gitea.pangea.org:trustchain-oc1-orchestral/ssikit_trustchain.git' 'master' } main "${@}"