Changeset 11997

Show
Ignore:
Timestamp:
02/07/07 14:13:49 (2 years ago)
Author:
ogrisel
Message:

make it possible to change the repo URL by command line arg + better management of return codes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • maven-repo/build-repo

    r8997 r11997  
    33 
    44import os 
     5import sys 
    56 
    67JARS = [ 
     
    103104        -Dfile=%(path)s \ 
    104105        -DrepositoryId=Nuxeo \ 
    105         -Durl=file:///var/www/svn.nuxeo.org/maven/repo/ 
     106        -Durl=%(repo_url)s 
    106107""" 
    107108 
     109DEFAULT_REPO_URL = "file:///var/www/svn.nuxeo.org/maven/repo/" 
     110 
    108111def main(): 
     112    if len(sys.argv) > 1: 
     113        repo_url = sys.argv[1] 
     114    else: 
     115        repo_url = DEFAULT_REPO_URL 
    109116    for path, groupId, artifactId, version in JARS: 
    110117        print CMD % locals() 
    111         os.system(CMD % locals()) 
     118        return_code = os.system(CMD % locals()) 
     119        if return_code != 0: 
     120            sys.exit(return_code) 
    112121 
    113 main() 
     122if __name__ == "__main__": 
     123    main()