This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2023-10-10 08:53:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
# DEBUG
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# clone or pull git repo
|
|
|
|
_pull() {
|
|
|
|
myurl="${1}"
|
2023-10-10 09:08:32 +00:00
|
|
|
mydir_raw="$(basename "${myurl}")"
|
|
|
|
mydir="${mydir_raw%.git}"
|
2023-10-10 08:53:27 +00:00
|
|
|
mybranch="${2}"
|
|
|
|
|
|
|
|
if [ -d "${mydir}" ]; then
|
|
|
|
cd "${mydir}"
|
|
|
|
git checkout "${mybranch}"
|
|
|
|
git pull
|
|
|
|
cd -
|
|
|
|
else
|
|
|
|
git clone "${myurl}" "${mydir}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
main() {
|
|
|
|
_pull 'https://gitea.pangea.org/pangea/django-orchestra' 'sso'
|
|
|
|
_pull 'https://gitea.pangea.org/pangea/django-musician' 'sso'
|
2023-10-10 09:08:32 +00:00
|
|
|
_pull 'git@gitea.pangea.org:trustchain-oc1-orchestral/IdHub.git' 'main'
|
2024-01-23 08:17:58 +00:00
|
|
|
_pull 'git@gitea.pangea.org:trustchain-oc1-orchestral/authentik.git' 'sso'
|
2023-10-10 08:53:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main "${@}"
|
|
|
|
|