2

I'm creating a script to compare two directories:

    for qa_branch in $QA_BRANCHES
    do
        exist_px=false
        info "1qa: $qa_branch"

        for px_branch in $PX_BRANCHES
        do
            info "2px: $px_branch"
            if [ "$qa_branch" = "$px_branch" ]; then
                exist_px=true

                cd test1
                checkout_branch "$qa_branch" || error "branch does not exist"
                cd ..

                cd test2    
                checkout_branch "$px_branch" || error "branch does not exist"
                cd ..

                echo
                info "compare_branches QA: $qa_branch with PX: $px_branch"
                diff -r --exclude=".*" test1/  test2/ 
                info "########################################################################"
            fi
        done
        info $exist_px
        echo
    done

When the execution reaches the diff command it stops and the execution of the script does not continue. How can i fix this?

The idea is to capture the differences and send them by email.

Thank you!

Xavier
  • 59
  • 5

0 Answers0