Skip to content

Instantly share code, notes, and snippets.

@mdornseif
Created September 6, 2011 13:27
Show Gist options
  • Save mdornseif/1197527 to your computer and use it in GitHub Desktop.
Save mdornseif/1197527 to your computer and use it in GitHub Desktop.
Projektstatistik anlegen
set -e
set -x
# damit dass alles klappt, muss man git, subversion, gnuplot und gource installiert haben
# 1. Step Create a clean Git repository with all our git repositories in it
function handle_repos {
ssh-add -k
git clone [email protected]:hudora/$1.git
echo $1
cd $1
git filter-branch --index-filter \
'git ls-files -s | perl -npe "s|\t|\t'$1'/|" | (GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && if [ -f $GIT_INDEX_FILE.new ]; then mv -f $GIT_INDEX_FILE.new $GIT_INDEX_FILE; fi)' HEAD
cd ../_all
git pull ../$1
cd ..
}
rm -Rf gittmp
mkdir gittmp
cd gittmp
git init _all
handle_repos hudorakit
handle_repos huImages
handle_repos huShop
handle_repos huSoftM
handle_repos avalanche
handle_repos pyJasper
handle_repos huRuck
handle_repos Containerliste
handle_repos Ablage
handle_repos Baruch
handle_repos Beliza
handle_repos CentralServices
handle_repos Config
handle_repos DeadTrees
handle_repos DrJones
handle_repos EDIhub
handle_repos EDIlib
handle_repos Eingangskontrolle
handle_repos FMTP
handle_repos InventoryControl
handle_repos baruch
handle_repos baruch2
handle_repos benEDIct
handle_repos hdMashup
handle_repos huJSTools
handle_repos huLOG
handle_repos huLogi
handle_repos huTools
handle_repos produktpass
handle_repos pyBookkeeping
handle_repos pyPostal
handle_repos pyShipping
handle_repos wwwHudoraDe
handle_repos Kalkulation
handle_repos Phonequeue
handle_repos RobotRock
handle_repos Skylord
handle_repos SoftMviewer
handle_repos Stocktaking
handle_repos Testdaten
handle_repos Wildside
handle_repos anbietr
handle_repos appengine-toolkit
handle_repos curm
handle_repos django-googleappsauth
handle_repos django-markitup
handle_repos dropshipping
handle_repos hd-munin-plugins
handle_repos hd3Dmodels
handle_repos hdMT490-to-ofx
handle_repos hd_MailToolbox
handle_repos hd_django_project_template
handle_repos html
handle_repos huBarcode
handle_repos huDjango
handle_repos huStaff
handle_repos hudora.github.com
handle_repos hudorakit
handle_repos hudoratools
handle_repos iPhoneTesting
handle_repos kernelE
handle_repos myPLfrontend
handle_repos node-http-auth-proxy
handle_repos node-postgres-proxy
handle_repos palpacker
handle_repos pyZendesk
handle_repos sanctex
handle_repos staplr
handle_repos terms
handle_repos tweetline.de
handle_repos wwwIntern
handle_repos APEX
# Account Namen vereinheitlichen. Ist Buggy, klappt leider gar nicht.
cd _all
git filter-branch --env-filter '
if [[ $GIT_AUTHOR_EMAIL =~ "^(md|m\.?dornseif)@" ]];
then
GIT_COMMITTER_NAME="Maximillian Dornseif";
GIT_AUTHOR_NAME="Maximillian Dornseif";
GIT_COMMITTER_EMAIL="[email protected]";
GIT_AUTHOR_EMAIL="[email protected]";
fi;
if [[ $GIT_AUTHOR_EMAIL =~ "^(cborgolte|c\.borgolte)@" ]];
then
GIT_COMMITTER_NAME="Christoph Borgolte";
GIT_AUTHOR_NAME="Christoph Borgolte";
GIT_COMMITTER_EMAIL="[email protected]";
GIT_AUTHOR_EMAIL="[email protected]";
fi;
if [[ $GIT_AUTHOR_EMAIL =~ "^(chris|c\.klein)@" ]];
then
GIT_COMMITTER_NAME="Christian Klein";
GIT_AUTHOR_NAME="Christian Klein";
GIT_COMMITTER_EMAIL="[email protected]";
GIT_AUTHOR_EMAIL="[email protected]";
fi;
' HEAD
cd ../..
exit 1
# Bizarren, grossen Code löschen, sloccount, dann wieder herstellen
rm -Rf gittmp/_all/curm/vendor
rm -Rf gittmp/_all/huBarcode/hubarcode/qrcode/qrdata/
rm -Rf gittmp/_all/hdMT490-to-ofx/gdata
sloccount gittmp/_all/
(cd gittmp/_all/ ; git reset --hard)
rm -Rf gitstats html_git
git clone git://repo.or.cz/gitstats.git
mkdir html_git
./gitstats/gitstats gittmp/_all/ html_git/
# rm -Rf svntmp
# mkdir svntmp
# cd svntmp/
# svn checkout file:///Users/md/code2/stats/allsvn/
# cd allsvn/
# svn log --xml -v > svn.log
# cd ../..
#
# rm -Rf html
# mkdir html
# java -jar statsvn.jar -output-dir html/ svntmp/allsvn/svn.log svntmp/allsvn
# gource --seconds-per-day 0.15 --colour-images --hide filenames --date-format %Y-%m-%d --max-files 10000 -auto-skip-seconds 1 --camera-mode track --file-idle-time 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment