Index: /trunk/locker/deploy/bin/mediawiki
===================================================================
--- /trunk/locker/deploy/bin/mediawiki	(revision 1214)
+++ /trunk/locker/deploy/bin/mediawiki	(revision 1215)
@@ -5,7 +5,4 @@
 
 setup();
-
-`cp skins/common/images/mediawiki.png skins/common/images/wiki.png`;
-`patch -s -p1 < /mit/scripts/deploy/mediawiki.patch`;
 
 print "\nPlease decide upon a title for your wiki and enter it below.\n";
Index: /trunk/locker/deploy/bin/onathena
===================================================================
--- /trunk/locker/deploy/bin/onathena	(revision 1214)
+++ /trunk/locker/deploy/bin/onathena	(revision 1215)
@@ -236,8 +236,18 @@
 
 # xavid: use p to keep the same permissions as in the file
-if [ "$deploy" = "mediawiki" ]; then
+repo="/mit/scripts/wizard$scriptsdev/srv/$deploy.git"
+if [ -e "$repo" ]; then
   admin=`cat .admin`
   rm .admin
-  git clone --shared "/mit/scripts/wizard$scriptsdev/srv/$deploy.git" .
+  ls -Al
+  athrun git git init
+  echo "Deny from all" > ".git/.htaccess"
+  echo "$repo/objects" > ".git/objects/info/alternates"
+  athrun git git remote add origin "$repo"
+  athrun git git config branch.master.remote origin
+  athrun git git config branch.master.merge refs/heads/master
+  athrun git git fetch origin
+  athrun git git branch --track master origin/master
+  athrun git git checkout master
   echo "$admin" > .admin
 else
Index: /trunk/locker/deploy/bin/onserver.pm
===================================================================
--- /trunk/locker/deploy/bin/onserver.pm	(revision 1214)
+++ /trunk/locker/deploy/bin/onserver.pm	(revision 1215)
@@ -9,4 +9,5 @@
 use POSIX qw(strftime);
 use LWP::UserAgent;
+use IPC::Open2;
 use URI;
 our @ISA = qw(Exporter);
@@ -127,12 +128,25 @@
   }
   
-  open(VERSION, ">.scripts-version") or die "Can't write scripts-version file: $!\n";
-  print VERSION strftime("%F %T %z\n", localtime);
-  print VERSION $ENV{'USER'}, '@', getclienthostname(), "\n";
-  my $tarball = abs_path("/mit/scripts/deploy$scriptsdev/$deploy.tar.gz");
-  print VERSION $tarball, "\n";
-  $tarball =~ s|/deploydev/|/deploy/|;
-  print VERSION dirname($tarball), "\n";
-  close(VERSION);
+  if(-e "/mit/scripts/wizard$scriptsdev/srv/$deploy.git") {
+    # fake an empty commit to get version info
+    my $pid = open2(\*GIT_OUT, \*GIT_IN, "git commit-tree HEAD: -p HEAD") or die "Can't execute git process";
+    print GIT_IN "User autoinstalled application\n";
+    print GIT_IN "Installed-by: ", $ENV{'USER'}, '@', getclienthostname(), "\n";
+    close(GIT_IN);
+    my $hash=<GIT_OUT>;
+    chomp($hash);
+    close(GIT_OUT);
+    waitpid $pid, 0; # reap zombies
+    system("git reset $hash");
+  } else {
+    open(VERSION, ">.scripts-version") or die "Can't write scripts-version file: $!\n";
+    print VERSION strftime("%F %T %z\n", localtime);
+    print VERSION $ENV{'USER'}, '@', getclienthostname(), "\n";
+    my $tarball = abs_path("/mit/scripts/deploy$scriptsdev/$deploy.tar.gz");
+    print VERSION $tarball, "\n";
+    $tarball =~ s|/deploydev/|/deploy/|;
+    print VERSION dirname($tarball), "\n";
+    close(VERSION);
+  }
 
   select STDOUT;
