diff --git a/Scripte/Makefile b/Scripte/Makefile index 9be9663..6a6c68a 100644 --- a/Scripte/Makefile +++ b/Scripte/Makefile @@ -6,8 +6,8 @@ default: data/users.map clean: @echo Räume auf… - @mkdir -p checkout convert - @rm -fr checkout convert + @mkdir -p bare checkout convert + @rm -fr bare/* checkout/* convert/* projects.list svn.users: @echo Lese Benutzerkennungen aus der Commit-Liste… @@ -33,3 +33,28 @@ convert/%: users.map @rm -rf "convert/$*" @git svn clone --no-metadata -A users.map "file://$(SVN_ROOT)/$*" "convert/$*" @cd "convert/$*"; git svn show-ignore > .gitignore; git add .gitignore; git commit -m 'SVN-Repository zu GIT konvertiert' + +bare/%: + make "convert/$*" + @echo Konvertiere zu Bare-Repository: $* + @mkdir -p "bare/$*.git" + @mv "convert/$*/.git" "bare/$*.git" && rm -rf "convert/$*" + @cd "bare/$*.git" && git config --bool core.bare true + +projects.list: + @echo Lese Projektstruktur von $(SVN_ROOT)… + @svn list file://$(SVN_ROOT) | grep -v ^20.. | grep "/$$" > projects.list + @YEARS=$$(svn list file://$(SVN_ROOT) | grep -e ^20..); \ + for YEAR in $$YEARS; do \ + echo Lese Projekte des Jahres $$YEAR…; \ + svn list file://$(SVN_ROOT)/$$YEAR | grep "/$$" | sed -e "s|^|$$YEAR|g" >> projects.list; \ + done + @echo Nachbearbeitung der Projektliste… + @sed -i "s|/$$||g" projects.list + +convert-all: projects.list + @echo Konvertiere alle Projekte aus projects.list + while read LINE; do \ + make "bare/$$LINE"; \ + done < projects.list +