prepare.sh: add code to select the branch to use