#!/usr/bin/perl


print $_[1];
$username = `whoami`;
chomp $username;


  mkdir ("/scratch/$username");
  mkdir ("/scratch/$username\/orxonox");


  open(SVN_CO, "svn co https://svn.orxonox.net/orxonox/trunk /scratch/$username\/orxonox/trunk |");
  while(<SVN_CO>){
  print $_;
  }
  
  chdir("/scratch/$username\/orxonox/trunk");


  print "executing autogen.sh";
  open( AUTOGEN , "./autogen.sh |");
  while(<AUTOGEN>){
   print $_;
  }

  print "executing configure for tardis";
  open(CONFIGURE, "./configure --with-tardis |");
  while(<CONFIGURE>){
    printf $_;
  }
  open(MAKE, "make -j3|");
  while(<MAKE>) {
    print $_;
  }

