This commit is contained in:
mr
2025-03-28 13:24:06 +01:00
parent 16eb38ca06
commit 8487b3c43d
6 changed files with 6 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ clone_repo() {
echo "Processing repository: $repo_name"
if [ !-d "$repo_name" ]; then
if [ ! -d "$1" ]; then
echo "Cloning repository: $repo_name"
git clone "$repo_url"
if [ $? -ne 0 ]; then
@@ -35,6 +35,7 @@ clone_repo() {
cd "$repo_name" && git checkout $branch && git pull && cd ..
}
branch=${1:-main}
cd ..
# Iterate through each repository in the list
for repo in "${REPOS[@]}"; do
clone_repo "$repo" "$branch"