#!/bin/bash set -e TOP=$(cd $(dirname "$0") && pwd) REPO=$TOP/wwwdocs.git mkdir $REPO cd $REPO git init --bare --shared DOWNLOAD=$TOP/download cd "$DOWNLOAD/cvs-fast-export" make -j cvs-fast-export grep -a = $DOWNLOAD/gcc-conversion/gcc.map | sed -e 's/>.*/>/' > $TOP/gcc.map # dje specially handled for GCC conversion because of ambiguity with # gcc2 repository. dimitar, shorne postdate GCC conversion map; not # needed once that is updated. Others not needed in GCC conversion # map, as only committed to wwwdocs not to main sources repository. cat >> $TOP/gcc.map < dimitar = Dimitar Dimitrov shorne = Stafford Horne angela = Angela Marie Thomas brads = Bradley Schatz gumby = David Henkel-Wallace kingdon = Jim Kingdon htdigid = htdigid automatic commit www = www user EOF cd "$DOWNLOAD/wwwdocs" find . -name '*,v' | sort | ../cvs-fast-export/cvs-fast-export -A $TOP/gcc.map | (cd "$REPO" && git fast-import) cd "$REPO" # CVS branches and tags are accidents from whole-CVS-repository # branching / tagging, remove. for ref in $(git for-each-ref --format='%(refname)'); do if [ "$ref" != "refs/heads/master" ]; then git update-ref -d "$ref" fi done git gc --aggressive --prune=all