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 '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=downloads"> ';
+ echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=download"> ';
}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 '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=downloads"> ';
+ echo '<meta http-equiv="refresh" content="0; URL=http://git.nexus-irc.de/?a=download"> ';
}
}else{
echo "unknown project";
}
print "\n";
} else {
- if (defined $action && $action != $home_link_str) {
- print " $action";
+ if (defined($action)) {
+ if ($action eq 'project_list') {
+ } else {
+ print " $action";
+ }
}
+ print "\n";
}
print "</div>\n";
-title => "$href_params{'-title'} $format feed",
-class => $feed_class}, $format)."\n";
}
-
+ print $cgi->a({-href => href(project=>$project, action=>"download"),
+ -class => $feed_class2}, "Downloads") . "\n";
} else {
print "<div class=\"page_footer_text\">Copyright © 2012, <a href=\"http://nexus-irc.de\">Nexus-IRC.de</a></div>\n";
print $cgi->a({-href => href(project=>undef, action=>"opml"),