Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [v3 2/4] package/nodejs: symlink /usr/lib/node_modules/.bin/* to /usr/bin
Date: Tue, 30 Jun 2015 19:48:03 +0200	[thread overview]
Message-ID: <20150630174803.GB3900@free.fr> (raw)
In-Reply-To: <1435660966-11347-2-git-send-email-martin@barkynet.com>

Martin, All,

On 2015-06-30 11:42 +0100, Martin Bark spake thusly:
> This patch symlinks all executables in /usr/lib/node_modules/.bin
> to /usr/bin so that node.js modules installed using
> BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL are accessible from the command line.
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> Changes v2 -> v3
>  - Create symlinks instead of setting PATH (Suggested by Yann E. MORIN)
> 
> Changes v1 -> v2
>  - Improved commit message
> ---
>  package/nodejs/nodejs.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> index 59e03b0..0b3f8a5 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -111,6 +111,14 @@ define NODEJS_INSTALL_MODULES
>  		$(HOST_DIR)/usr/bin/npm install \
>  		$(NODEJS_MODULES_LIST) \
>  	)
> +
> +	# Symlink all executables in $(TARGET_DIR)/usr/lib/node_modules/.bin to
> +	# $(TARGET_DIR)/usr/bin so they are accessible from the command line
> +	cd $(TARGET_DIR)/usr/bin; \
> +	for f in ../../usr/lib/node_modules/.bin/*; do \
> +		[ -f "$${f}" -a -x "$${f}" ] || continue; \
> +		ln -sf "$${f}" "$${f##*/}" || exit 1; \
> +	done
>  endef
>  endif
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-06-30 17:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 10:42 [Buildroot] [v3 1/4] package/nodejs: Add node.js v0.12.5 and set as the default version Martin Bark
2015-06-30 10:42 ` [Buildroot] [v3 2/4] package/nodejs: symlink /usr/lib/node_modules/.bin/* to /usr/bin Martin Bark
2015-06-30 17:48   ` Yann E. MORIN [this message]
2015-06-30 10:42 ` [Buildroot] [v3 3/4] package/nodejs: Add npm_config_target_arch to npm command Martin Bark
2015-06-30 18:01   ` Yann E. MORIN
2015-06-30 23:32     ` Martin Bark
2015-06-30 10:42 ` [Buildroot] [v3 4/4] package/nodejs: Define NPM command for other packages to use Martin Bark
2015-06-30 17:52   ` Yann E. MORIN
2015-06-30 17:46 ` [Buildroot] [v3 1/4] package/nodejs: Add node.js v0.12.5 and set as the default version Yann E. MORIN
2015-06-30 22:20 ` Yann E. MORIN
2015-07-02  8:22   ` Martin Bark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150630174803.GB3900@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox