Permalink
Browse files

flex compile script: allow compilation of many files

  • Loading branch information...
1 parent e99c888 commit a5add2ee175922e3b1ef2f8d596e5b71395f3b3c @yanne yanne committed Jan 31, 2011
Showing with 10 additions and 7 deletions.
  1. +10 −7 compile_flex.py
View
17 compile_flex.py 100644 → 100755
@@ -1,4 +1,6 @@
-"""Usage: python compile_flex.py [file name]
+#!/usr/bin/env python
+
+"""Usage: python compile_flex.py [file name]
e.g. python compile_flex.py test/resources/html/flex/LoginApp.mxml
Troubleshooting:
@@ -14,11 +16,12 @@
import sys
-def compile_flex(file_name):
- subprocess.call([os.path.join(os.environ['FLEX_HOME'], 'bin', 'mxmlc'),
- '-source-path=../flex-pilot/src/',
- '-source-path+=test/resources/html/flex/',
- file_name])
+def compile_flex(file_names):
+ for file_name in file_names:
+ subprocess.call([os.path.join(os.environ['FLEX_HOME'], 'bin', 'mxmlc'),
+ '-source-path=../flex-pilot/src/',
+ '-source-path+=test/resources/html/flex/',
+ file_name])
def exit_with(msg):
print msg
@@ -37,4 +40,4 @@ def exit_with(msg):
exit_with(__doc__)
if not 'FLEX_HOME' in os.environ:
exit_with('Please set FLEX_HOME environment variable.')
- compile_flex(sys.argv[1])
+ compile_flex(sys.argv[1:])

0 comments on commit a5add2e

Please sign in to comment.