#!/bin/bash

BRANCH=$(git rev-parse --abbrev-ref HEAD)

cd vendor

if [ ! -d daydreamlab ]; then
  mkdir daydreamlab
fi

cd daydreamlab

rm -rf jjaj JJAJ cms user dddream observer media

git clone https://github.com/DaydreamLab/JJAJ.git
git clone https://github.com/DaydreamLab/user.git
git clone https://github.com/DaydreamLab/cms.git
git clone https://github.com/DaydreamLab/dddream.git
git clone https://github.com/DaydreamLab/media.git
git clone https://github.com/DaydreamLab/observer.git

mv JJAJ jjaj

cd jjaj
git checkout base/master
cd ../user
git checkout ipetbooking/dev
cd ../cms
git checkout develop

cd ../dddream
git checkout ipetbooking/dev

cd ../media
git checkout develop
cd ../observer
git checkout develop

cd ../../..

composer dump-autoload
