# HG changeset patch # User David Barts # Date 1559278922 25200 # Node ID caed7c5e831844d9ba943acdd131523ed2af639b # Parent ccd52fb45cff033cbc2ee2d4ebb255bc9800df68 Another bug fix. diff -r ccd52fb45cff -r caed7c5e8318 install-static --- a/install-static Thu May 30 21:55:26 2019 -0700 +++ b/install-static Thu May 30 22:02:02 2019 -0700 @@ -25,7 +25,6 @@ sys.exit(2) def copydir(source, target, exclude=True): - global args for entry in os.listdir(source): if exclude and entry == WINF: continue @@ -50,11 +49,12 @@ print("cp", repr(spath), repr(tpath)) copyfile(spath, tpath) elif S_ISDIR(stype): - if ttype is not None and not S_ISDIR(ttype): - sys.stderr.write( - "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) - sys.exit(1) - if not S_ISDIR(ttype): + if ttype is not None: + if not S_ISDIR(ttype): + sys.stderr.write( + "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) + sys.exit(1) + else: print("mkdir", repr(tpath)) os.mkdir(tpath) copydir(spath, tpath, False)