&1 | ' . 'grep -c "\[GNUPG:\] VALIDSIG ' . $key_regex . ' "' )) == '0') die('Commit ' . $commit_identifier . ' is not signed by ' . $_GET['valid_keys']); } if (isset($_GET['p'])) { if (base64_decode($_GET['p'],true)===false) die('Invalid base64'); $prefix = ' --prefix="$(' . 'echo "' . $_GET['p'] . '" | ' . 'base64 -d' . ')"'; } else { $prefix = ''; } $handle = popen( 'git -C "../work/repositories/' . $_GET['t'] . '/' . $_GET['r'] . '" archive' . $prefix . ' "' . $commit_identifier . '" | ' . 'gzip -nc', 'r' ); if ($handle === false) die('Unable to create archive'); header('Content-type: application/x-gzip'); header('Content-Disposition: attachment; filename="archive.tar.gz"'); fpassthru($handle); pclose($handle); die(); } die('errrm, this is not yet implemented'); } print 'Hi, this is an archive server!
' . "\n"; print 'I provide archives of these upstreams:
' . "\n"; print implode( "
\n", array_map( "base64_decode", explode( "\n", shell_exec( 'find "' . $work_dir . 'repositories" -mindepth 2 -maxdepth 2 -printf "%f\n" | sort' ) ) ) ); die();