summaryrefslogtreecommitdiffstats
path: root/site/functions.php
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-05-27 13:16:27 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-05-27 13:16:27 (EDT)
commita8ec455783e179515782a3c6a5e53474af2eca59 (patch)
treebf111a97e603e3fd0f699b08f57106bbd929d222 /site/functions.php
parent0e94461327c7c757793587703498b206934d0484 (diff)
downloadlibreboot.org-a8ec455783e179515782a3c6a5e53474af2eca59.zip
libreboot.org-a8ec455783e179515782a3c6a5e53474af2eca59.tar.gz
libreboot.org-a8ec455783e179515782a3c6a5e53474af2eca59.tar.bz2
download page: rsync mirrors now shown via function
Diffstat (limited to 'site/functions.php')
-rw-r--r--site/functions.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/site/functions.php b/site/functions.php
index 0e20d2b..fb023b9 100644
--- a/site/functions.php
+++ b/site/functions.php
@@ -16,15 +16,12 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-?>
-<?php
/* Functions */
/* Generic function for showing a list of URLs */
function mirrorList($arrayMirrors,$strNotFoundMessage,$forIndexStart,$forIndexbelow) {
-?>
-<?php
+
if (count($arrayMirrors)>0) {
for ($server=$forIndexStart; $server<$forIndexbelow; $server++) {
?>
@@ -36,7 +33,31 @@
<p><?php echo $strNotFoundMessage; ?></p>
<?php
}
+ }
+
+ /* List rsync mirroring instructions */
+ function rsyncList($arrayRsync,$strNotFoundMessage,$forIndexStart,$forIndexBelow) {
+ if (
+ count($arrayRsync)>0 && ($forIndexStart<=count($arrayRsync)-1)
+ && ($forIndexBelow<=count($arrayRsync)) && ($forIndexStart<=$forIndexBelow)) {
+
+ for ($server=$forIndexStart; $server<$forIndexBelow; $server++) {
+?>
+ <h2>
+ <?php echo $arrayRsync[$server][1]; ?>
+ </h2>
+ <p>
+ <b>rsync -avxP --delete --stats <?php echo $arrayRsync[$server][0]; ?> /path/to/docroot/libreboot/</b>
+ </p>
+<?php
+ }
+
+ } else {
?>
+ <p>
+ <?php echo $strNotFoundMessage; ?>
+ </p>
<?php
+ }
}
?>