Fix git clone error by checking if repository already exists and using git pull instead

This commit is contained in:
nmemmert committed 2025-11-05 13:28:49 -05:00
1 parent 9ec67b0a45
commit d92f557b4b
1 file changed
+9 -2
+9 -2
View File
@@ -67,8 +67,15 @@ REPO_URL="https://gitlab.com/trbc-dev/eoy-pdf-sortandmerge.git"
log_info "Cloning application repository..."
if command -v git &> /dev/null; then
sudo apt install -y git
git clone "$REPO_URL" .
git checkout web-app
if [[ -d ".git" ]]; then
log_info "Repository already exists, pulling latest changes..."
git pull origin web-app
git checkout web-app
else
log_info "Cloning fresh repository..."
git clone "$REPO_URL" .
git checkout web-app
fi
else
log_warning "Git not available. Please manually download and extract the application files to $APP_DIR"
exit 1