Ignore:
Timestamp:
03/31/2011 05:33:28 PM (12 years ago)
Author:
marcus
Message:

r192 | walther | 2011-03-31 17:30:28 +0200 (Do, 31 Mär 2011) | 4 lines

  • locsat and fk source may be defined at command line
  • replacing makedepend by gccmakedep (bug not fixed for 5 years in Xorg)
  • added include to sysbase.h for proper macro definition
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/setup/setup.py

    r343 r358  
    33import os 
    44import sys 
     5import shutil 
    56 
    67default_location = "/usr/local/sh" 
     
    4142    print "Downloading %s..." % pkg 
    4243 
    43     verbose = dbg and "" or "-q " 
     44    verbose = "" 
     45    if dbg: 
     46        verbose = "-q " 
     47        print downloads[pkg] 
    4448 
    45     if os.system("wget %s-P %s %s" % (verbose, target, downloads[pkg])): 
    46         abort("Cannot download %s. Exit here." % pkg) 
     49    if downloads[pkg].split(":")[0].lower() in ["http", "ftp"]: 
     50        error = os.system("wget %s-P %s %s" % (verbose, target, downloads[pkg])) 
     51    else: 
     52        # try to copy file 
     53        error = True 
     54        try: 
     55            shutil.copy(downloads[pkg], target) 
     56            error = False 
     57        except IOError: 
     58            pass 
     59     
     60    if error: 
     61        abort("Cannot access %s. Exit here." % pkg) 
    4762 
    4863def setup(**kwargs): 
     
    87102 
    88103    copy(os.path.join(data["pwd"], ".."), os.path.join(target, "sh"), dbg) 
    89     download(target, "locsat", dbg) 
    90     download(target, "fk", dbg) 
     104     
     105    for pkg in ["locsat", "fk"]: 
     106        downloads[pkg] = kwargs.get(pkg) 
     107        download(target, pkg, dbg) 
    91108 
    92109    exitcode = install(target, dbg) 
     
    153170                      help="Turn on debug option.", default=False) 
    154171 
     172    parser.add_option("--locsat", dest="locsat", action="store", 
     173                      help="Overwrite locsat installation source.", 
     174                      default=downloads["locsat"]) 
     175 
     176    parser.add_option("--fk", dest="fk", action="store", 
     177                      help="Overwrite fk package installation source.", 
     178                      default=downloads["fk"]) 
     179 
    155180    (options, args) = parser.parse_args() 
    156181 
Note: See TracChangeset for help on using the changeset viewer.