2025-01-22 14:21:31 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
REPOS=(
|
|
|
|
"https://cloud.o-forge.io/core/oc-aggregator.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-auth.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-catalog.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-datacenter.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-discovery.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-front.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-discovery.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-monitord.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-peer.git"
|
2025-01-22 15:10:35 +01:00
|
|
|
"https://cloud.o-forge.io/core/oc-shared.git"
|
2025-01-22 14:21:31 +01:00
|
|
|
"https://cloud.o-forge.io/core/oc-scheduler.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-schedulerd.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-workflow.git"
|
|
|
|
"https://cloud.o-forge.io/core/oc-workspace.git"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Function to clone repositories
|
|
|
|
clone_repo() {
|
|
|
|
local repo_url="$1"
|
|
|
|
local repo_name=$(basename "$repo_url" .git)
|
|
|
|
|
|
|
|
echo "Processing repository: $repo_name"
|
|
|
|
|
|
|
|
if [ -d "$repo_name" ]; then
|
|
|
|
echo "Repository '$repo_name' already exists. Pulling latest changes..."
|
|
|
|
cd "$repo_name" && git pull && cd ..
|
|
|
|
else
|
|
|
|
echo "Cloning repository: $repo_name"
|
|
|
|
git clone "$repo_url"
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Error cloning $repo_url"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Iterate through each repository in the list
|
|
|
|
for repo in "${REPOS[@]}"; do
|
|
|
|
clone_repo "$repo"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "All repositories processed successfully."
|
|
|
|
|
|
|
|
|
|
|
|
|