|
35 | 35 |
|
36 | 36 |
|
37 | 37 | # Application version
|
38 |
| -ver = '0.7.1' |
| 38 | +ver = '0.7.2' |
39 | 39 |
|
40 | 40 | # Default paths to Mercurial and Git
|
41 | 41 | hg_cmd = 'hg'
|
@@ -1153,17 +1153,22 @@ def get_mbedlib_dir(self):
|
1153 | 1153 | # Gets mbed tools dir (unified)
|
1154 | 1154 | def get_tools_dir(self):
|
1155 | 1155 | mbed_os_path = self.get_os_dir()
|
| 1156 | + paths = [] |
1156 | 1157 | # mbed-os dir identified and tools is a sub dir
|
1157 |
| - if mbed_os_path and os.path.isdir(os.path.join(mbed_os_path, 'tools')): |
1158 |
| - return os.path.join(mbed_os_path, 'tools') |
| 1158 | + if mbed_os_path: |
| 1159 | + paths.append([mbed_os_path, 'tools']) |
| 1160 | + paths.append([mbed_os_path, 'core', 'tools']) |
1159 | 1161 | # mbed-os not identified but tools found under cwd/tools
|
1160 |
| - elif os.path.isdir(os.path.join(self.path, 'tools')): |
1161 |
| - return os.path.join(self.path, 'tools') |
| 1162 | + paths.append([self.path, 'tools']) |
| 1163 | + paths.append([self.path, 'core', 'tools']) |
1162 | 1164 | # mbed Classic deployed tools
|
1163 |
| - elif os.path.isdir(os.path.join(self.path, '.temp', 'tools')): |
1164 |
| - return os.path.join(self.path, '.temp', 'tools') |
1165 |
| - else: |
1166 |
| - return None |
| 1165 | + paths.append([self.path, '.temp', 'tools']) |
| 1166 | + |
| 1167 | + for p in paths: |
| 1168 | + if os.path.isdir(os.path.join(*p)): |
| 1169 | + return os.path.join(*p) |
| 1170 | + |
| 1171 | + return None |
1167 | 1172 |
|
1168 | 1173 | # Routines after cloning mbed-os
|
1169 | 1174 | def post_action(self):
|
|
0 commit comments