Commits

Jason Pierce  committed 3f6ee8c

Import them for real this time.

  • Participants
  • Parent commits a8ee3d8

Comments (0)

Files changed (12)

+Live demo at http://helic.wholebean.info/~pierce.jason/vector/source_repo1/search.php
+Source repo at https://bitbucket.org/VLCore/vabs
+
+Usage:
+search.php?pkg=PKGNAME
+or
+search.php?pkg=PKGNAME&loc=LOCATION
+
+Valid options for LOCATION include "vlabs", "abs", and "sb".
+
+Current demo PKGNAME include "bash", and "bashburn".

File search-abs.sh

+#!/bin/sh
+pkgname="$1";
+abs_dir="./var/abs/";
+
+
+find "$abs_dir" -name "$pkgname";

File search-vlabs.sh

+#!/bin/sh
+pkgname="$1";
+abs_dir="./var/vlabs/";
+
+
+find "$abs_dir" -name "$pkgname";
+<?php
+$loc_list = array(
+	'vlabs' => 'search-vlabs.sh',
+	'abs' => 'search-abs.sh',
+	'sb' => 'search-sb.sh' );
+
+
+echo "
+<html>
+<head>
+	<title>Search package buildscripts.</title>
+</head>
+<body> \n
+";
+
+$end="\n
+</body>
+</html>
+";
+
+if( ! isset( $_REQUEST['pkg'] ) ) {
+	echo "<p>Usage: <br> search.php?pkg=PKGNAME <br> or <br> search.php?pkg=PKGNAME&loc=LOCATION</p> \n";
+	echo "<p>Valid options for LOCATION include \"vlabs\", \"abs\", and \"sb\".</p> \n";
+	echo $end;
+	exit;
+} else {
+	$pkg = escapeshellarg( $_REQUEST['pkg'] );
+}
+
+if( ! isset( $_REQUEST['loc'] ) ) {
+	$loc = 'vlabs';
+} else {
+	if( ! array_key_exists( $_REQUEST['loc'], $loc_list ) ) {
+		echo '<p>Specified location unknown. Using default location.</p>';
+	} else {
+		$loc = $_REQUEST['loc'];
+#		$loc = escapeshellarg( $_REQUEST['loc'] );
+#		Don't need to escape, since matched to whitelist?
+	}
+}
+
+echo "<p>Using search params
+<ul>
+	<li>Package Name: $pkg</li>
+	<li>Location: $loc</li>
+	<li>Backend: $loc_list[$loc]</li>
+</ul>
+</p>";
+
+exec( "./$loc_list[$loc] $pkg", $backend_results);
+#exec( "./search-abs.sh bash", $backend_results);
+
+echo "<p>Found results \n <ul>";
+foreach( $backend_results as $find ) {
+	echo "\t<li><a href=\"$find\">$find</a></li>\n";
+}
+echo "</ul> \n </p>";
+
+echo $end;
+?>

File var/abs/community/bashburn/PKGBUILD

+pkgname=bashburn
+pkgver=3.0.1
+pkgrel=4
+pkgdesc="A cd burning shell script"
+arch=('any')
+

File var/abs/community/bashburn/bashburn-3.0.1-5vl.src.gz

Binary file added.

File var/abs/community/bashburn/bashburn.changelog

Empty file added.

File var/abs/community/bashburn/bashburnrc

Empty file added.

File var/abs/core/bash/PKGBUILD

+pkgname=bash
+pkgver=4.2
+pkgrel=2
+pkgdesc="The GNU Bourne Again shell"
+arch=('i686' 'x86_64')
+

File var/abs/core/bash/bash-4.2-2vl.src.tar.gz

Binary file added.

File var/abs/core/bash/system.bashrc

Empty file added.

File var/abs/core/bash/user.bashrc

Empty file added.