GeezerVison is showing github.com — tools: backport tools/install.py for headers · nodejs/node@28ab7b0
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 |
|---|
@@ -139,6 +139,9 @@ def files(action): |
139 | 139 |
|
140 | 140 | if 'true' == variables.get('node_install_npm'): npm_files(action) |
141 | 141 |
|
| 142 | + headers(action) |
| 143 | + |
| 144 | +def headers(action): |
142 | 145 | action([ |
143 | 146 | 'common.gypi', |
144 | 147 | 'config.gypi', |
@@ -183,8 +186,13 @@ def run(args): |
183 | 186 | if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir) |
184 | 187 |
|
185 | 188 | cmd = args[1] if len(args) > 1 else 'install' |
186 | | - if cmd == 'install': return files(install) |
187 | | - if cmd == 'uninstall': return files(uninstall) |
| 189 | + if os.environ.get('HEADERS_ONLY'): |
| 190 | + if cmd == 'install': return headers(install) |
| 191 | + if cmd == 'uninstall': return headers(uninstall) |
| 192 | + else: |
| 193 | + if cmd == 'install': return files(install) |
| 194 | + if cmd == 'uninstall': return files(uninstall) |
| 195 | + |
188 | 196 | raise RuntimeError('Bad command: %s\n' % cmd) |
189 | 197 |
|
190 | 198 | if __name__ == '__main__': |
|