Lines Matching full:os
25 import os
80 if os.path.isfile('rtconfig_project.h'):
91 if os.environ.get('ENV_ROOT'):
92 return os.environ.get('ENV_ROOT')
95 home_dir = os.environ['USERPROFILE']
96 env_dir = os.path.join(home_dir, '.env')
98 home_dir = os.environ['HOME']
99 env_dir = os.path.join(home_dir, '.env')
101 if not os.path.exists(env_dir):
124 home_dir = os.environ['HOME']
126 home_dir = os.environ['USERPROFILE']
128 env_dir = os.path.join(home_dir, '.env')
129 if not os.path.exists(env_dir):
130 os.mkdir(env_dir)
131 os.mkdir(os.path.join(env_dir, 'local_pkgs'))
132 os.mkdir(os.path.join(env_dir, 'packages'))
133 os.mkdir(os.path.join(env_dir, 'tools'))
134 kconfig = open(os.path.join(env_dir, 'packages', 'Kconfig'), 'w')
137 if not os.path.exists(os.path.join(env_dir, 'packages', 'packages')):
139 …ret = os.system('git clone https://github.com/RT-Thread/packages.git %s' % os.path.join(env_dir, '…
141 shutil.rmtree(os.path.join(env_dir, 'packages', 'packages'))
153 kconfig = open(os.path.join(env_dir, 'packages', 'Kconfig'), 'w')
166 if not os.path.exists(os.path.join(env_dir, 'tools', 'scripts')):
168 …ret = os.system('git clone https://github.com/RT-Thread/env.git %s' % os.path.join(env_dir, 'tools…
170 shutil.rmtree(os.path.join(env_dir, 'tools', 'scripts'))
192 env_sh = open(os.path.join(env_dir, 'env.sh'), 'w')
195 if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')):
196 … os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"]
200 kconfig_dir = os.path.join(RTT_ROOT, 'tools', 'kconfig-frontends')
201 os.system('scons -C ' + kconfig_dir)
206 os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')
210 if os.path.isfile(fn):
211 mtime = os.path.getmtime(fn)
215 kconfig_cmd = os.path.join(RTT_ROOT, 'tools', 'kconfig-frontends', 'kconfig-mconf')
216 os.system(kconfig_cmd + ' Kconfig')
218 if os.path.isfile(fn):
219 mtime2 = os.path.getmtime(fn)
234 os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')
238 if os.path.isfile(fn):
239 mtime = os.path.getmtime(fn)
245 if os.path.isfile(fn):
246 mtime2 = os.path.getmtime(fn)
263 os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')