summaryrefslogtreecommitdiff
path: root/devel-utf8/convertsyntax.php
diff options
context:
space:
mode:
authorNathan Gass2012-03-22 18:23:53 +0000
committerNathan Gass2012-03-22 18:23:53 +0000
commit338cda9000356404cf2865d61787607acf67fe98 (patch)
tree3924b3e2e12a5d5ea3b40890477d5e070498543c /devel-utf8/convertsyntax.php
parente0a89b408041d25b18090bfc3d596627ea930507 (diff)
downloaditools-338cda9000356404cf2865d61787607acf67fe98.tar.gz
itools-338cda9000356404cf2865d61787607acf67fe98.tar.bz2
itools-338cda9000356404cf2865d61787607acf67fe98.zip
last remains of wrong branch itools/live/devel-utf8 removed
Diffstat (limited to 'devel-utf8/convertsyntax.php')
-rwxr-xr-xdevel-utf8/convertsyntax.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/devel-utf8/convertsyntax.php b/devel-utf8/convertsyntax.php
deleted file mode 100755
index 282b774..0000000
--- a/devel-utf8/convertsyntax.php
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-php_sapi_name() == "cli" or exit("Can only be used from CLI\n");
-ini_set('include_path', dirname(__FILE__) . "/..:" . ini_get('include_path'));
-require "itools/itools.lib";
-
-$opts = it::getopt("
- Usage: $argv[0] [OPTIONS]
- -o, --old Convert to old syntax (default)
- -n, --new Convert to new syntax
- -t, --test Test if is old syntax
- -v, --verbose Verbose output (otherwise -t only sets result code)
-");
-
-$mode = $opts['test'] ? 'test' : ($opts['new'] ? 'new' : 'old');
-$files = $opts['args'] ? $opts['args'] : array('php://stdin');
-$result = 0;
-
-foreach ($files as $file)
-{
- $converter = new it_syntaxconverter(file_get_contents($file), $mode);
-
- if ($mode == 'test')
- {
- if ($converter->changes)
- {
- if ($opts['verbose'])
- echo "$file contains $converter->changes new syntax elements\n";
-
- $result++;
- }
- }
- else
- {
- echo $converter->output;
-
- if ($opts['verbose'] && $converter->changes)
- fputs(fopen("php://stderr", "w"), "$converter->changes changes made to $file\n");
- }
-}
-
-exit($result);