Lines Matching refs:os
26 import os
36 if os.path.isabs(args.libdir):
37 destdir = os.environ.get('DESTDIR')
39 to = os.path.join(destdir, args.libdir[1:])
43 to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.libdir)
45 master = os.path.join(to, os.path.basename(args.megadriver))
47 if not os.path.exists(to):
48 if os.path.lexists(to):
49 os.unlink(to)
50 os.makedirs(to)
53 abs_driver = os.path.join(to, driver)
55 if os.path.lexists(abs_driver):
56 os.unlink(abs_driver)
58 os.link(master, abs_driver)
61 ret = os.getcwd()
62 os.chdir(to)
64 name, ext = os.path.splitext(driver)
66 if os.path.lexists(name):
67 os.unlink(name)
68 os.symlink(driver, name)
69 name, ext = os.path.splitext(name)
71 os.chdir(ret)
74 os.unlink(master)
75 name, ext = os.path.splitext(master)
77 if os.path.lexists(name):
78 os.unlink(name)
79 name, ext = os.path.splitext(name)