Changeset 680


Ignore:
Timestamp:
Dec 6, 2004, 7:26:35 PM (20 years ago)
Author:
ole
Message:

Fixed up commandline version of compile to take individual files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/compile.py

    r644 r680  
    282282  import sys, os
    283283  from os.path import splitext
    284    
    285   path = os.path.split(sys.argv[0])[0] or os.getcwd()
    286   files = os.listdir(path)
     284 
     285  if len(sys.argv) > 1:
     286      files = sys.argv[1:]
     287      for filename in files:
     288          root, ext = splitext(filename)
     289
     290          if ext <> '.c':
     291              print 'WARNING (compile.py): Skipping %s. I only compile C-files.' %filename
     292     
     293  else: 
     294      #path = os.path.split(sys.argv[0])[0] or os.getcwd()
     295      path = '.'
     296      files = os.listdir(path)
     297     
     298     
    287299
    288300  for filename in files:
    289301      root, ext = splitext(filename)
    290 
    291302
    292303      if ext == '.c':
Note: See TracChangeset for help on using the changeset viewer.