--- /dev/null
+#!/bin/sh
+
+set -e
+
+exec >/dev/null 2>&1
+
+me=/var/tmp/git-mirror-lock
+if ! lockfile-create "$me"; then
+ exit 1
+fi
+lockfile-touch "$me" & lockpid=$!
+trap 'kill $lockpid || true; cd "$mepwd"; lockfile-remove "$me"' EXIT
+trap 'exit 1' INT TERM
+
+mkdir -p /var/cache/git/xonotic
+cd /var/cache/git/xonotic
+ssh xonotic@git.xonotic.org ./send-git-configs.sh | tar xvf -
+
+for X in /var/cache/git/*/*.git; do
+ cd "$X"
+ git config remote.origin.fetch "+refs/*:refs/*"
+ git config remote.origin.mirror "true"
+ git config remote.origin.url "git://git.xonotic.org/${X#/var/cache/git/}"
+ git fetch
+ git remote prune origin
+ git gc --auto
+ touch git-daemon-export-ok
+done
--- /dev/null
+# TODO: turn this into a REAL diff
+# what we did: we added the line with @ stuff
+
+# replace invalid utf8 character with SUBSTITUTION sequence
+sub esc_html {
+ my $str = shift;
+ my %opts = @_;
+
+ return undef unless defined $str;
+
+ $str = to_utf8($str);
+ $str = $cgi->escapeHTML($str);
+ $str =~ s/@/@/g;
+ if ($opts{'-nbsp'}) {
+ $str =~ s/ / /g;
+ }
+ $str =~ s|([[:cntrl:]])|(($1 ne "\t") ? quot_cec($1) : $1)|eg;
+ return $str;
+}
+
--- /dev/null
+# path to git projects (<project>.git)
+$projectroot = "/var/cache/git";
+
+# directory to use for temp files
+$git_temp = "/tmp";
+
+# target of the home link on top of all pages
+#$home_link = $my_uri || "/";
+
+# html text to include at home page
+$home_text = "indextext.html";
+
+# file with project list; by default, simply scan the projectroot dir.
+$projects_list = $projectroot;
+
+# stylesheet to use
+$stylesheet = "/gitweb/gitweb.css";
+
+# logo to use
+$logo = "/gitweb/git-logo.png";
+
+# the 'favicon'
+$favicon = "/gitweb/git-favicon.png";
+
+$feature{'blame'}{'override'} = 1;
+$feature{'blame'}{'default'} = [1];
+
+$feature{'snapshot'}{'override'} = 1;
+$feature{'snapshot'}{'default'} = [0];
+
+$feature{'search'}{'default'} = [0];
+
+$feature{'grep'}{'override'} = 1;
+$feature{'grep'}{'default'} = [0];
+
+$feature{'pickaxe'}{'override'} = 1;
+$feature{'pickaxe'}{'default'} = [0];
+
+$feature{'show-sizes'}{'override'} = 1;
+$feature{'show-sizes'}{'default'} = [1];
+
+$feature{'pathinfo'}{'default'} = [0];
+
+$feature{'forks'}{'default'} = [1];
+
+$feature{'actions'}{'default'} = [
+ ("merge-request", "http://nl.git.xonotic.org/merge-request/?n=%n&h=%h&hb=%b", "tree")
+];
+
+$feature{'ctags'}{'default'} = [0];
+
+$feature{'patches'}{'override'} = 0;
+$feature{'patches'}{'default'} = [64];
+
+$feature{'avatar'}{'override'} = 0;
+$feature{'avatar'}{'default'} = [''];
+
+$feature{'timed'}{'default'} = [0];
+
+$feature{'javascript-actions'}{'default'} = [1];
--- /dev/null
+<VirtualHost *:80>
+
+ServerName de.git.xonotic.org
+SetEnv GIT_PROJECT_ROOT /var/cache/git
+AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/cache/git/$1
+AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/cache/git/$1
+ScriptAliasMatch \
+ "(?x)^/(.*/(HEAD | \
+ info/refs | \
+ objects/info/[^/]+ | \
+ git-(upload|receive)-pack))$" \
+ /usr/lib/git-core/git-http-backend/$1
+
+DocumentRoot /var/www-gitweb/
+Options FollowSymLinks +ExecCGI
+AddHandler cgi-script .cgi
+Alias /gitweb /var/www-gitweb/
+
+</VirtualHost>