[asterisk-commits] mvanbaak: branch group/cli_cleanup r144878 - /team/group/cli_cleanup/contrib/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 26 19:47:02 CDT 2008


Author: mvanbaak
Date: Fri Sep 26 19:47:01 2008
New Revision: 144878

URL: http://svn.digium.com/view/asterisk?view=rev&rev=144878
Log:
add a small script to find CLI commands without a usage

It's a bit of a hack, but it helps

Added:
    team/group/cli_cleanup/contrib/scripts/grep_usage.php   (with props)

Added: team/group/cli_cleanup/contrib/scripts/grep_usage.php
URL: http://svn.digium.com/view/asterisk/team/group/cli_cleanup/contrib/scripts/grep_usage.php?view=auto&rev=144878
==============================================================================
--- team/group/cli_cleanup/contrib/scripts/grep_usage.php (added)
+++ team/group/cli_cleanup/contrib/scripts/grep_usage.php Fri Sep 26 19:47:01 2008
@@ -1,0 +1,32 @@
+<?php
+ /*
+  * Asterisk -- An open source telephony toolkit.
+  *
+  * Copyright (C) 1999 - 2008, Digium, Inc.
+  *
+  * Michiel van Baak <michiel at vanbaak.info>
+  *
+  * See http://www.asterisk.org for more information about
+  * the Asterisk project. Please do not directly contact
+  * any of the maintainers of this project for assistance;
+  * the project provides a web site, mailing lists and IRC
+  * channels for your use.
+  *
+  * This program is free software, distributed under the terms of
+  * the GNU General Public License Version 2. See the LICENSE file
+  * at the top of the source tree.
+  */
+
+$res = array();
+$cmd = "grep -rni -A 1 'e->command' * | grep -v '.svn' | sort | uniq";
+$foo = exec($cmd, $res);
+
+foreach ($res as $key=>$value) {
+	if (strstr($value, "command")) {
+		//check if the next one is 'usage'
+		if (!strstr($res[$key+1], "usage")) {
+			echo $value." has no usage\n";
+		}
+	}
+}
+?>

Propchange: team/group/cli_cleanup/contrib/scripts/grep_usage.php
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/cli_cleanup/contrib/scripts/grep_usage.php
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/cli_cleanup/contrib/scripts/grep_usage.php
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list