[website] 01/01: Downloading the source via josmredir.php doesn't work, display the get-orig-source command instead.
Bas Couwenberg
sebastic at xs4all.nl
Wed Oct 29 23:43:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository website.
commit 3dce0dedaeb1c1f85920c63d1ea20e90c932be4b
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Thu Oct 30 00:43:15 2014 +0100
Downloading the source via josmredir.php doesn't work, display the get-orig-source command instead.
---
josmredir.php | 71 +++++++++++++++++------------------------------------------
1 file changed, 20 insertions(+), 51 deletions(-)
diff --git a/josmredir.php b/josmredir.php
index 05332a0..4484790 100755
--- a/josmredir.php
+++ b/josmredir.php
@@ -11,44 +11,6 @@ $i18nrepo = "http://svn.openstreetmap.org/applications/editors/josm/i18n/";
#print_r($_GET);
#echo "</pre>";
-if (isset($_GET["rev"]) && preg_match("/^\d+$/", $_GET["rev"])) {
- $destdir = "josm/".uniqid("josm-");
- $dfsg = (isset($_GET["debian"]) and $_GET["debian"] == "yes") ? true : false;
- $svnrev = intval($_GET["rev"]);
-
- # lock the directory we're working on
- file_put_contents("josm/josm.lock", $destdir);
-
- # do the job
- $desttgz = "josm/josm_0.0.svn$svnrev.orig.tar.gz";
- exec("svn export -r $svnrev $svnrepo $destdir");
- exec("svn info --xml -r $svnrev $svnrepo > $destdir/REVISION");
- exec("svn export $i18nrepo $destdir/i18n");
-
- if ($dfsg) {
- exec("rm -rf $destdir/images/styles/standard");
- exec("find $destdir -name '*.jar' -exec rm {} \;");
- exec("rm -rf $destdir/data_nodist");
- }
-
- exec("tar czf ".basename($desttgz)." -C josm ".basename($destdir));
- exec("rm -rf $destdir");
-
- # remove the lock on the directory
- unlink("josm/josm.lock");
-
- # Send the file
- header("Content-Type: application/force-download");
- header("Content-Type: application/octet-stream");
- header("Content-Type: application/download");
- header("Content-Disposition: attachment; filename=".basename($desttgz).";");
- header("Content-Transfer-Encoding: binary");
- header("Content-Length: ".filesize($desttgz));
- readfile($desttgz);
- unlink($desttgz);
- exit();
-}
-else {
$re = $tested_re;
$text = "tested";
if (isset($_GET["get"])) {
@@ -80,19 +42,17 @@ else {
<p>
This page is mainly meant to be used with
- <tt><a href="http://packages.debian.org/sid/devscripts">uscan</a><a href="http://manpages.debian.org/cgi-bin/man.cgi?query=uscan">(1)</a></tt>.
+ <span style="font-family: monospace;"><a href="http://packages.debian.org/sid/devscripts">uscan</a><a href="http://manpages.debian.org/cgi-bin/man.cgi?query=uscan">(1)</a></span>.
</p>
<p>
- You can pass different arguments to the query string:
+ Supported argument(s):
</p>
<ul>
<li>
- <dt>debian</dt>
- <dd>"<em>yes</em>" makes it generate a source packages as used by the Debian GNU distribution;</dd>
- </li>
- <li>
- <dt>get</dt>
- <dd>"<em>latest</em>" makes it look for (and generate) the source package for josm-latest.jar. Any other value makes it act on josm-tested.jar.</dd>
+ <dl>
+ <dt>get</dt>
+ <dd>"<em>latest</em>" makes it look for josm-latest.jar. Any other value makes it act on josm-tested.jar.</dd>
+ </dl>
</li>
</ul>
@@ -113,17 +73,26 @@ else {
}
fclose($handle);
}
+
+if (isset($_GET["rev"]) && preg_match("/^\d+$/", $_GET["rev"])) {
?>
+<hr />
+To get the source for JOSM <?= $_GET["rev"] ?> run:
+<pre>
+SVNREV=<?= $_GET["rev"] ?> make -f debian/rules get-orig-source
+</pre>
+<?php
+}
+?>
<hr />
<address>
For any issue contact the <a href="mailto:debian-gis at lists.debian.org">Debian GIS mailinglist</a>.<br/>
- <small>Source code available in the website git repository:
- <a href="http://anonscm.debian.org/cgit/pkg-grass/website.git/tree/josmredir.php">http://anonscm.debian.org/cgit/pkg-grass/website.git/tree/josmredir.php</a>.
+ <small>
+ Source code available in the website git repository:
+ <a href="http://anonscm.debian.org/cgit/pkg-grass/website.git/tree/josmredir.php">http://anonscm.debian.org/cgit/pkg-grass/website.git/tree/josmredir.php</a>.
+ </small>
</address>
</body>
</html>
-<?php
-}
-?>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/website.git
More information about the Pkg-grass-devel
mailing list