#!/bin/sh

# create my working directory
mkdir foo
cd foo



# get both repositories:
git clone git://git.gnome.org/vala
git clone git://git.gnome.org/valadoc



# Turn valadoc into a branch in vala called valadoc:
cd vala
git remote add valadoc ../valadoc/
git fetch valadoc



# Restructure the valadoc branch
git checkout -b tmp/valadoc valadoc/master
mkdir valadoc
git mv AUTHORS valadoc
git mv autogen.sh valadoc
git mv ChangeLog valadoc
git mv configure.ac valadoc
git mv COPYING valadoc
git mv doc/ valadoc
git mv icons/ valadoc
git mv INSTALL valadoc
git mv MAINTAINERS valadoc
git mv Makefile.am valadoc
git mv NEWS valadoc
git mv README valadoc
git mv src/ valadoc
git mv tests/ valadoc
git mv THANKS valadoc
git mv valadoc.doap valadoc
git commit -m "Create valadoc/ and move everything related into it"



# Drop valadocs .gitignore 
git rm .gitignore
git commit -m "Drop valadocs .gitignore"



# Finally add valadoc/ to master:
git checkout master
git merge tmp/valadoc

