Adjustments

This commit is contained in:
mr
2025-03-27 13:04:29 +01:00
parent 1ef92e5975
commit 4ef9bb399f
30 changed files with 68 additions and 299 deletions

View File

@@ -2,13 +2,10 @@
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"
"https://cloud.o-forge.io/core/oc-shared.git"
@@ -20,6 +17,7 @@ REPOS=(
# Function to clone repositories
clone_repo() {
local branch=${2:-main}
local repo_url="$1"
local repo_name=$(basename "$repo_url" .git)
@@ -27,7 +25,7 @@ clone_repo() {
if [ -d "$repo_name" ]; then
echo "Repository '$repo_name' already exists. Pulling latest changes..."
cd "$repo_name" && git pull && cd ..
cd "$repo_name" && git checkout $branch && git pull && cd ..
else
echo "Cloning repository: $repo_name"
git clone "$repo_url"
@@ -37,10 +35,10 @@ clone_repo() {
fi
fi
}
branch=${1:-main}
# Iterate through each repository in the list
for repo in "${REPOS[@]}"; do
clone_repo "$repo"
clone_repo "$repo" "$branch"
done
echo "All repositories processed successfully."