From 3a7180a8dcf69e142800e1d79d0f9c20371b55f3 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Wed, 30 Jun 2010 08:37:50 +0200
Subject: [PATCH] Merged.
---
framework/Qc/script/horde-quality-control.php | 107 ++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
create mode 100755 framework/Qc/script/horde-quality-control.php
diff --git a/framework/Qc/script/horde-quality-control.php b/framework/Qc/script/horde-quality-control.php
new file mode 100755
index 000000000..dc2cb6b3b
--- /dev/null
+++ b/framework/Qc/script/horde-quality-control.php
@@ -0,0 +1,107 @@
+#!/usr/bin/env php
+ 'store_true')
+ ),
+);
+$parser = new Horde_Argv_Parser(
+ array(
+ 'optionList' => $options,
+ 'usage' => '%prog ' . _("[options] PACKAGE_PATH")
+ )
+);
+list($opts, $args) = $parser->parseArgs();
+
+if (empty($args[0])) {
+ echo "Please specify the path to the package you want to release!\n\n";
+ $parser->printUsage(STDERR);
+ exit(1);
+}
+
+$package_path = $args[0];
+if (!is_dir($package_path)) {
+ printf("%s specifies no directory!\n", $package_path);
+ exit(1);
+}
+
+$package_file = $package_path . '/package.xml';
+
+if (!file_exists($package_file)) {
+ printf("There is no package.xml at %s!\n", $package_path);
+ exit(1);
+}
+
+$package = PEAR_PackageFileManager2::importOptions(
+ $package_file,
+ array(
+ 'packagedirectory' => $package_path,
+ 'filelistgenerator' => 'file',
+ 'clearcontents' => false,
+ 'clearchangelog' => false,
+ 'simpleoutput' => true,
+ 'ignore' => array('*~', 'conf.php', 'CVS/*'),
+ 'include' => '*',
+ 'dir_roles' =>
+ array(
+ 'lib' => 'php',
+ 'doc' => 'doc',
+ 'example' => 'doc',
+ 'script' => 'script',
+ 'test' => 'test',
+ 'migration' => 'data',
+ ),
+ )
+);
+
+$package->generateContents();
+
+/**
+ * This is required to clear the