|
@@ -34,26 +34,6 @@ fi
|
|
|
|
|
|
source bin/install.cfg
|
|
source bin/install.cfg
|
|
|
|
|
|
-# Function to check if a repository exists and perform git pull or git clone
|
|
|
|
-update_repository() {
|
|
|
|
- local repo_url="$1"
|
|
|
|
- local repo_dir="$2"
|
|
|
|
- local repo_branch="$3"
|
|
|
|
-
|
|
|
|
- if [ -d "$repo_dir" ]; then
|
|
|
|
- # If the directory exists, then do a git pull
|
|
|
|
- echo_warning "Updating $repo_dir..."
|
|
|
|
- cd "$repo_dir" || exit
|
|
|
|
- git checkout $repo_branch
|
|
|
|
- git pull
|
|
|
|
- cd - || exit
|
|
|
|
- else
|
|
|
|
- # If the directory does not exist, then do a git clone
|
|
|
|
- echo_warning "Cloning $repo_url into $repo_dir..."
|
|
|
|
- git clone -b "$repo_branch" "$repo_url" "$repo_dir"
|
|
|
|
- fi
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
# Update repositories
|
|
# Update repositories
|
|
update_repository "$TICKETS" "tickets" "$TICKETS_BRANCH"
|
|
update_repository "$TICKETS" "tickets" "$TICKETS_BRANCH"
|
|
update_repository "$BACKEND" "dbsynce" "$BACKEND_BRANCH"
|
|
update_repository "$BACKEND" "dbsynce" "$BACKEND_BRANCH"
|