#!/bin/bash set -ex TOKEN=${1:-'password'} GITLAB_URL=${2:-'http://gitlab.example.com'} LOCAL_GITLAB_GHORG_DIR=${3:-"${HOME}/Desktop/ghorg"} export GHORG_INSECURE_GITLAB_CLIENT=true # NOTE run all clones twice to test once for clone then pull ## # # #### ##### #### # # ##### #### # # # # # # # # # # # # # # # # # # # ##### # # # # # # # # # #### ###### # # # ### ##### # # # # ##### # # # # # # # # # # # # # # # # # # ###### ###### #### # # #### #### # #### ############ CLONE AND TEST ALL-GROUPS, PRESERVE DIR, OUTPUT DIR ############ ghorg clone all-groups --scm=gitlab --base-url="${GITLAB_URL}" --token="$TOKEN" --preserve-dir --output-dir=local-gitlab-v15-repos ghorg clone all-groups --scm=gitlab --base-url="${GITLAB_URL}" --token="$TOKEN" --preserve-dir --output-dir=local-gitlab-v15-repos GOT=$( ghorg ls local-gitlab-v15-repos/local-gitlab-group1 | grep -o 'local-gitlab-v15-repos/local-gitlab-group1.*') WANT=$(cat <