#!/bin/bash
# Copyright 2016 Alf Gaida <agaida@siduction.org>
# License: GPL2+

source VERSION

[ -d ./debtemplate ] && rm -rf debtemplate

git checkout templates -- bootstrap
git checkout templates -- debtemplate

[ -f ./debian/rules ] && ./bootstrap && echo 'Bootstrap first run ...'
[ ! -f ./debian/rules ] && ./bootstrap && echo 'Bootstrap second run ...'

[ -f ./debian/rules ] && rm -rf debtemplate
[ -f ./debian/rules ] && rm -f bootstrap

[ ! -f ./debian/rules ] && echo 'Something went wrong, debian/rules not created! Check bootstrap!'

git add .
