".$_GET["p"].": No Download available

"; }else{ $name=substr($_GET["p"],0,strlen($_GET["p"])-4); if(file_exists("/usr/share/gitweb/dl/".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz")) { echo "

".$_GET["p"].": Download git-".substr($con, 0, -1)."-".substr($hash, 0, -1)."

"; } else { echo "

".$_GET["p"].": No Download available (Build snapshot)

"; } } }else{ echo "unknown project"; } }elseif(isset($_GET['build'])){ if(file_exists("/home/git/".$_GET['build'])){ $name=substr($_GET['build'],0,strlen($_GET['build'])-4); if(file_exists("/usr/share/gitweb/dl/".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz")) { echo ' '; }else{ $hash = shell_exec("git --git-dir=/home/git/".$_GET['build']." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"); $con= shell_exec('git --git-dir=/home/git/'.$_GET['build'].' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); $b = shell_exec("cd /usr/share/gitweb/dl; git clone git://git.nexus-irc.de/".$_GET['build']); $c = shell_exec("cd /usr/share/gitweb/dl; tar czfv ".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz ".$name); $d = shell_exec("rm -r /usr/share/gitweb/dl/".$name); echo ' '; } }else{ echo "unknown project"; } }elseif(isset($_GET['build2'])){ if(file_exists("/home/git/".$_GET['build2'])){ $name=substr($_GET['build2'],0,strlen($_GET['build2'])-4); if(file_exists("/usr/share/gitweb/dl/".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz")) { echo ' '; }else{ $hash = shell_exec("git --git-dir=/home/git/".$_GET['build2']." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"); $con= shell_exec('git --git-dir=/home/git/'.$_GET['build2'].' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); $b = shell_exec("cd /usr/share/gitweb/dl/; git clone git://git.nexus-irc.de/".$_GET['build2']); $c = shell_exec("cd /usr/share/gitweb/dl; tar czfv ".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz ".$name); $d = shell_exec("rm -r /usr/share/gitweb/dl/".$name); echo ' '; } }else{ echo "unknown project"; } }else{ $a = file_get_contents("http://git.nexus-irc.de/index.cgi?a=project_index2"); $b = explode("\n",$a); foreach($b as $id => $v) { if($v == ""){ }else{ $hash = shell_exec("git --git-dir=/home/git/".$v." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"); $con= shell_exec('git --git-dir=/home/git/'.$v.' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); if(!$hash){ echo "

".$v.": No Download available

"; }else{ $name=substr($v,0,strlen($v)-4); if(file_exists("/usr/share/gitweb/dl/".$name."-git-".substr($con, 0, -1)."-".substr($hash, 0, -1).".tar.gz")) { echo "

".$v.": Download git-".substr($con, 0, -1)."-".substr($hash, 0, -1)."

"; } else { echo "

".$v.": No Download available (Build snapshot)

"; } } } } } ?>