Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

Commit 7a10dc5

Browse files
committed
install: install ayo -> node compat symlink
Install a symlink for compatibility with scripts that expect a binary called `node` or have a /path/to/node shebang. Only done on UNIX platforms because symlinks on Windows require elevated privileges. Refs: 72f1b34 PR-URL: #10 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1508469 commit 7a10dc5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/install.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ def files(action):
135135

136136
action([output_prefix + output_file], 'bin/' + output_file)
137137

138+
if not is_windows:
139+
# Install ayo -> node compatibility symlink.
140+
link_target = 'bin/ayo'
141+
link_path = abspath(install_path, link_target)
142+
if action == uninstall:
143+
action([link_path], link_target)
144+
elif action == install:
145+
try_symlink('node', link_path)
146+
else:
147+
assert(0) # Unhandled action type.
148+
138149
if 'true' == variables.get('node_use_dtrace'):
139150
action(['out/Release/node.d'], 'lib/dtrace/node.d')
140151

0 commit comments

Comments
 (0)