Nathaniel van Diepen 10 vuotta sitten
vanhempi
commit
bf8fab6aa0
7 muutettua tiedostoa jossa 48 lisäystä ja 44 poistoa
  1. 3 1
      .gitignore
  2. 9 0
      bin/repo-update
  3. 0 4
      skel/i686/.gitignore
  4. 36 14
      skel/index.php
  5. 0 3
      skel/templates/footer.template
  6. 0 18
      skel/templates/header.template
  7. 0 4
      skel/x86_64/.gitignore

+ 3 - 1
.gitignore

@@ -1,2 +1,4 @@
 etc/repo.key
-omni.db
+omni.db
+repo/latest/config.txt
+repo/latest/name.txt

+ 9 - 0
bin/repo-update

@@ -9,6 +9,15 @@ fi;
 root="$(readlink -f $(dirname $BASH_SOURCE)/..)";
 . $root/etc/repo.conf
 . $root/etc/sites.conf
+echo $reponame > $root/repo/latest/name.txt;
+echo "[$reponame]" > $root/repo/latest/config.txt;
+echo "SigLevel = Never" >> $root/repo/latest/config.txt;
+for val in "${sites[@]}"; do
+	unset site;
+	declare -A site;
+	eval "site=($val)";
+	echo "Server = ${site[site]}" >> $root/repo/latest/config.txt;
+done;
 for val in "${sites[@]}"; do
 	unset site;
 	declare -A site;

+ 0 - 4
skel/i686/.gitignore

@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore

+ 36 - 14
skel/index.php

@@ -1,15 +1,37 @@
 <?php
-	echo file_get_contents('templates/header.template');
-	$db = scandir('phar://'.getcwd().'/x86_64/omni.db');
-	$dir1 = scandir(getcwd().'/i686');
-	$dir2 = scandir(getcwd().'/x86_64');
-	foreach($db as $file) {
-		$desc = file_get_contents('phar://'.getcwd().'/x86_64/omni.db/'.$file.'/desc');
-		$desc = substr($desc,strrpos($desc,'%DESC%')+7,strlen($desc)-strrpos($desc,'%DESC%')-(strlen($desc)-strpos($desc,'%CSIZE%'))-7);
-		echo "<h2>$file</h2><p><h4>{$desc}</h4> :: Downloads<br/>";
-		echo " => <a href='i686/$file-i686.pkg.tar.xz'>i686</a><br/>";
-		echo " => <a href='x86_64/$file-x86-64.pkg.tar.xz'>x86_64</a><br/>";
-		echo "</p>";
-	}
-	echo file_get_contents('templates/footer.template');
-?>
+	$name = file_get_contents('name.txt');
+?>
+<!doctype html>
+<html>
+	<head>
+		<link rel="icon" type="image/ico" href="favicon.ico">
+		<title>[<?php echo $name;?>]</title>
+		<style>
+			#wrapper{
+				margin-right: auto;
+				margin-left: auto;
+				width: 500px;
+			}
+		</style>
+	</head>
+	<body>
+		<div id="wrapper">
+			<h1>[<?php echo $name;?>] Repo Installation:</h1>
+			Append this to /etc/pacman.conf
+			<pre><?php echo file_get_contents('config.txt');?></pre>
+			<?php
+				$db = scandir('phar://'.getcwd().'/x86_64/omni.db');
+				$dir1 = scandir(getcwd().'/i686');
+				$dir2 = scandir(getcwd().'/x86_64');
+				foreach($db as $file) {
+					$desc = file_get_contents('phar://'.getcwd().'/x86_64/omni.db/'.$file.'/desc');
+					$desc = substr($desc,strrpos($desc,'%DESC%')+7,strlen($desc)-strrpos($desc,'%DESC%')-(strlen($desc)-strpos($desc,'%CSIZE%'))-7);
+					echo "<h2>$file</h2><p><h4>{$desc}</h4> :: Downloads<br/>";
+					echo " => <a href='i686/$file-i686.pkg.tar.xz'>i686</a><br/>";
+					echo " => <a href='x86_64/$file-x86-64.pkg.tar.xz'>x86_64</a><br/>";
+					echo "</p>";
+				}
+			?>
+		</div>
+	</body>
+</html>

+ 0 - 3
skel/templates/footer.template

@@ -1,3 +0,0 @@
-		</div>
-	</body>
-</html>

+ 0 - 18
skel/templates/header.template

@@ -1,18 +0,0 @@
-<html>
-	<head>
-		<link rel="icon" type="image/ico" href="favicon.ico">
-		<title>[omni]</title>
-		<style>
-			#wrapper{
-				margin-right: auto;
-				margin-left: auto;
-				width: 500px;
-			}
-		</style>
-	</head>
-	<body>
-		<div id="wrapper">
-			<h1>[omni] Repo:</h1>
-			Append this to /etc/pacman.conf
-			<pre>[omni]
-Server = </pre>

+ 0 - 4
skel/x86_64/.gitignore

@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore