Skip to content

Commit

Permalink
install: install ayo -> node compat symlink
Browse files Browse the repository at this point in the history
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: ayojs#10
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Fishrock123 committed Aug 24, 2017
1 parent 1508469 commit 7a10dc5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ def files(action):

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

if not is_windows:
# Install ayo -> node compatibility symlink.
link_target = 'bin/ayo'
link_path = abspath(install_path, link_target)
if action == uninstall:
action([link_path], link_target)
elif action == install:
try_symlink('node', link_path)
else:
assert(0) # Unhandled action type.

if 'true' == variables.get('node_use_dtrace'):
action(['out/Release/node.d'], 'lib/dtrace/node.d')

Expand Down

0 comments on commit 7a10dc5

Please sign in to comment.