# HG changeset patch # User David Barts # Date 1559279981 25200 # Node ID 243603aaab7e0bd97439420270828d1190f35571 # Parent caed7c5e831844d9ba943acdd131523ed2af639b Clean up the code a bit. diff -r caed7c5e8318 -r 243603aaab7e install-static --- a/install-static Thu May 30 22:02:02 2019 -0700 +++ b/install-static Thu May 30 22:19:41 2019 -0700 @@ -49,14 +49,13 @@ print("cp", repr(spath), repr(tpath)) copyfile(spath, tpath) elif S_ISDIR(stype): - 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: + if ttype is None: print("mkdir", repr(tpath)) os.mkdir(tpath) + elif not S_ISDIR(ttype): + sys.stderr.write( + "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) + sys.exit(1) copydir(spath, tpath, False) else: sys.stderr.write(