MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / main

Function main

tools/python-3.11.9-amd64/Tools/scripts/mkreal.py:44–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 os.symlink(join(linkto, filename), join(name, filename))
43
44def main():
45 sys.stdout = sys.stderr
46 progname = os.path.basename(sys.argv[0])
47 if progname == '-c': progname = 'mkreal'
48 args = sys.argv[1:]
49 if not args:
50 print('usage:', progname, 'path ...')
51 sys.exit(2)
52 status = 0
53 for name in args:
54 if not os.path.islink(name):
55 print(progname+':', name+':', 'not a symlink')
56 status = 1
57 else:
58 if os.path.isdir(name):
59 mkrealdir(name)
60 else:
61 mkrealfile(name)
62 sys.exit(status)
63
64if __name__ == '__main__':
65 main()

Callers 1

mkreal.pyFile · 0.70

Calls 6

mkrealdirFunction · 0.85
mkrealfileFunction · 0.85
basenameMethod · 0.80
printFunction · 0.50
exitMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected