Handle arguments
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 17 Aug 2006 06:54:04 +0000 (06:54 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 17 Aug 2006 06:54:04 +0000 (06:54 +0000)
docs/makepo.sh.php

index f8b5e4bdb215efe648a47ebb22323d6a0054190d..554c021c8c888f677842a47901f14c9a2aba0d9f 100755 (executable)
@@ -22,8 +22,6 @@
 
 require_once('/Server/htdocs/ISSO/Functions.php');
 
-// TODO - process $argv and translate them into xgettext arguments
-
 // ###################################################################
 // generate the list of files to process
 
@@ -72,7 +70,11 @@ foreach ($templates AS $paths)
 // ###################################################################
 // run xgettext on all of the various files that we have now created
 
-exec('xgettext -n ' . implode(' ', $files));
+// get any arguments and just pass them to xgettext
+$arguments = $argv;
+unset($arguments[0]);
+
+exec('xgettext ' . implode(' ', $arguments) . ' ' . implode(' ', $files));
 
 // ###################################################################
 // remove all the files we no longer need