--- /dev/null
+#!/bin/sh
+
+cd /git
+
+gitwebfiles="git-favicon.png git-logo.png gitweb.cgi gitweb.css"
+
+########
+gitwebpattern=""
+for file in $gitwebfiles; do gitwebpattern="${gitwebpattern}|$file" ; done
+gitwebpattern=$(echo "$gitwebpattern" | sed -e 's,|,,')
+
+### function count () {
+###
+### echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx counting"
+###
+### echo git
+### ls git | wc -l
+###
+### echo gitweb
+### ls gitweb | egrep -v "$gitwebpattern" | wc -l
+###
+### }
+###
+### function missing_in_git () {
+###
+### echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in git"
+###
+### for i in $(ls gitweb | egrep -v $gitwebpattern); do
+### b=$(basename $i .git)
+### [ -d git/$b ] || echo $b missing in git
+### done
+###
+### }
+
+function missing_in_gitweb () {
+
+### echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in gitweb (from git)"
+###
+### for i in $(ls git); do
+### echo -n "$i "
+### if [ ! -h gitweb/${i}.git ] ; then
+### echo -n "ADDING $i.git "
+### (cd git; ln -s ../$i/.git ${i}.git)
+### fi
+### done
+
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx missing in gitweb (for web)"
+ for i in $gitwebfiles; do
+ echo -n "$i "
+ if [ ! -h git/${i} ] ; then
+ echo "LINKING.. " ; (cd git; ln -s ../${i} .)
+ fi
+ done
+ echo ""
+
+}
+
+function fill_descriptions () {
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking descriptions "
+ for arg in "$@" ; do
+ # accept args like git/plcapi
+ i=$(basename $arg)
+ echo -n "$i "
+ grep Unnamed git/$i/.git/description && { echo -n $i "Setting.. "; echo $i > git/$i/.git/description ; }
+ done
+ echo ""
+}
+
+function upload_archives () {
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx checking configs for uploadarch "
+ for arg in "$@" ; do
+ # accept args like git/plcapi
+ i=$(basename $arg)
+ echo -n "$i "
+ if ! grep uploadarch git/$i/.git/config ; then
+ echo -n $i "Setting.. ";
+ cat >> git/$i/.git/config <<EOF
+[daemon]
+ uploadpack = false
+ uploadarch = true
+EOF
+ fi
+ done
+ echo ""
+}
+
+#count
+#missing_in_git
+missing_in_gitweb
+fill_descriptions $(ls git | egrep -v "${gitwebpattern}")
+upload_archives $(ls git | egrep -v "${gitwebpattern}")
--- /dev/null
+#!/bin/bash
+
+# uses svn2git ruby script
+# install rubygems
+# sudo gem install svn2git --source http://gemcutter.org
+
+#http provides really crappy performance....
+#SVNROOT="http://svn.planet-lab.org/svn"
+# so run locally at princeton
+SVNROOT="file:///svn"
+
+function clone () {
+ for arg in "$@" ; do
+ SVN_MODULE=$(basename $arg)
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx converting module $SVN_MODULE in $(pwd)"
+ SVN_PATH=${SVNROOT}/${SVN_MODULE}
+ GIT_REPO=$(echo $SVN_MODULE | sed 's/.*/\L&/')
+
+# rm -rf $TMPDIR
+# mkdir -p $TMPDIR
+# pushd $TMPDIR
+# git svn init -s $SVN_PATH --no-metadata
+# git svn fetch
+# popd
+
+ rm -rf $GIT_REPO
+ mkdir -p $GIT_REPO
+ pushd $GIT_REPO
+ svn2git $SVN_PATH
+ popd
+ done
+}
+
+args="$@"
+[[ -z "$args" ]] && args=$(ls /svn)
+
+clone $args
--- /dev/null
+#!/bin/bash
+#
+# Init file for git daemon
+#
+# chkconfig: 2345 55 25
+# description: git server daemon
+#
+# processname: git-daemon
+# pidfile: /var/run/git.pid
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+# pull in sysconfig settings
+[ -f /etc/sysconfig/git ] && . /etc/sysconfig/git
+
+RETVAL=0
+prog="git-daemon"
+
+# Some functions to make the below more readable
+GIT=/usr/bin/git-daemon
+PID_FILE=/var/run/git-daemon.pid
+
+# override OPTIONS altogether for more flexibility
+OPTIONS=${OPTIONS:- --pid-file=${PID_FILE} --base-path=${GITDIR} --port=${PORT} ${VERBOSE} ${DETACH} ${SYSLOG} ${EXPORT} ${GITWHITELIST}}
+
+runlevel=$(set -- $(runlevel); eval "echo \$$#" )
+
+start()
+{
+ echo -n $"Starting $prog: "
+ $GIT $OPTIONS && success || failure
+ RETVAL=$?
+ [ "$RETVAL" = 0 ] && touch /var/lock/subsys/git
+ echo
+}
+
+stop()
+{
+ echo -n $"Stopping $prog: "
+ if [ -n "`pidfileofproc $GIT`" ] ; then
+ killproc $GIT
+ else
+ failure $"Stopping $prog"
+ fi
+ RETVAL=$?
+ # if we are in halt or reboot runlevel kill all running sessions
+ # so the TCP connections are closed cleanly
+ if [ "x$runlevel" = x0 -o "x$runlevel" = x6 ] ; then
+ killall $prog 2>/dev/null
+ fi
+ [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/git
+ echo
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/git ] ; then
+ if [ "$RETVAL" = 0 ] ; then
+ stop
+ # avoid race
+ sleep 3
+ start
+ fi
+ fi
+ ;;
+ status)
+ status -p $PID_FILE git-daemon
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+ RETVAL=1
+esac
+exit $RETVAL
--- /dev/null
+# variables looked at
+GITDIR=/git/git
+GITWHITELIST=/git/git/tests
+PORT=9418
+VERBOSE=
+DETACH=--detach
+SYSLOG=--syslog
+EXPORT=--export-all
+# or set this one in extenso
+# OPTIONS=
--- /dev/null
+#!/bin/bash
+
+GITDIR="git"
+GITWEBDIR="gitweb"
+
+function link () {
+ REPO=$(echo $1 | sed 's/.*/\L&/')
+ rm -f ${PWD}/${GITWEBDIR}/${REPO}.git
+ ln -s ${PWD}/${GITDIR}/${REPO}/.git/ ${PWD}/${GITWEBDIR}/${REPO}.git
+}
+
+for i in $*
+do
+ link $i
+done