dbrtools/dbr/dbrenv.py
branchDBRToolsDev
changeset 285 6a928cf9e181
parent 284 0792141abac7
equal deleted inserted replaced
284:0792141abac7 285:6a928cf9e181
    14 # DBREnv - OO rewrite of the Environments  
    14 # DBREnv - OO rewrite of the Environments  
    15 
    15 
    16 #I'm using the existing stuff as helpers until things get relocated...
    16 #I'm using the existing stuff as helpers until things get relocated...
    17 import os.path
    17 import os.path
    18 import glob
    18 import glob
       
    19 import re
    19 
    20 
    20 import dbrutils
    21 import dbrutils
    21 import dbrbaseline
    22 import dbrbaseline
    22 import dbrpatch
    23 import dbrpatch
    23 
    24 
    32 #    return DBRBaselineEnv(location)
    33 #    return DBRBaselineEnv(location)
    33     print 'loading patched baseline environment'
    34     print 'loading patched baseline environment'
    34     return DBRPatchedBaselineEnv(location)
    35     return DBRPatchedBaselineEnv(location)
    35   if(os.path.exists(os.path.join(location,'build_md5.zip'))):
    36   if(os.path.exists(os.path.join(location,'build_md5.zip'))):
    36     print 'loading zipped environment'
    37     print 'loading zipped environment'
       
    38     return DBRZippedEnv(location)
       
    39   if(re.match('http://.+',location, re.IGNORECASE)):  
       
    40     print 'loading remote zipped environment'
    37     return DBRZippedEnv(location)
    41     return DBRZippedEnv(location)
    38   if(os.path.exists(os.path.join(location,dbrutils.patch_path_internal()))): #should do something more fun with creating a basleine if we have MD5s
    42   if(os.path.exists(os.path.join(location,dbrutils.patch_path_internal()))): #should do something more fun with creating a basleine if we have MD5s
    39     print 'loading new env...warning: this is only here for compatibility'
    43     print 'loading new env...warning: this is only here for compatibility'
    40     return DBRNewLocalEnv(location)
    44     return DBRNewLocalEnv(location)
    41   if(os.path.exists(os.path.join(location,'epoc32'))): 
    45   if(os.path.exists(os.path.join(location,'epoc32'))):