GeezerVison is showing github.com — tools: backport tools/install.py for headers · nodejs/node@ce2a393
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/install.py +10-2Lines changed: 10 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -142,6 +142,9 @@ def files(action): |
142 | 142 |
|
143 | 143 | if 'true' == variables.get('node_install_npm'): npm_files(action) |
144 | 144 |
|
| 145 | + headers(action) |
| 146 | + |
| 147 | +def headers(action): |
145 | 148 | action([ |
146 | 149 | 'common.gypi', |
147 | 150 | 'config.gypi', |
@@ -194,8 +197,13 @@ def run(args): |
194 | 197 | install_path = dst_dir + node_prefix + '/' |
195 | 198 |
|
196 | 199 | cmd = args[1] if len(args) > 1 else 'install' |
197 | | - if cmd == 'install': return files(install) |
198 | | - if cmd == 'uninstall': return files(uninstall) |
| 200 | + if os.environ.get('HEADERS_ONLY'): |
| 201 | + if cmd == 'install': return headers(install) |
| 202 | + if cmd == 'uninstall': return headers(uninstall) |
| 203 | + else: |
| 204 | + if cmd == 'install': return files(install) |
| 205 | + if cmd == 'uninstall': return files(uninstall) |
| 206 | + |
199 | 207 | raise RuntimeError('Bad command: %s\n' % cmd) |
200 | 208 |
|
201 | 209 | if __name__ == '__main__': |
|