#!/bin/bash
source ./function.sh
# abort on errors
set -e

# Define the commit command
while getopts c: option
do
case "${option}"
in
c) COMMIT=${OPTARG};;
esac
done

if [ -n "$(git status --porcelain)" ]; then
   update
elif [ -n "$(git log origin/master..master)" ]; then
   change
fi


# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/hero.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/video.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/text_img.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/news.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/images.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/form.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/editor.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/basic/columns.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/step.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/mapmulti.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/team.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/testimonials.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/projects.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/partners.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/map.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/faq.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/campaigns.git
# git clone git@gitlab.spade.be:minotaure/plugin/widgets/premium/events.git