summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Wadley2016-03-11 20:01:02 +0000
committerTom Wadley2016-03-11 20:01:02 +0000
commitafb13502d98791f60add397fb64cb7c7d16b264c (patch)
tree39f615df53b40b7f4e1fae5e04aac62a85b1df8d
parent0bc22a29546d14aa71e97334f04deaa8ed3b437c (diff)
downloadaur-afb13502d98791f60add397fb64cb7c7d16b264c.tar.gz
Fix 'nvm exec' command by having init-nvm.sh create a script in NVM_DIR which passes through to the installed nvm-exec script
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD14
-rw-r--r--init-nvm.sh1
-rw-r--r--install-nvm-exec3
4 files changed, 20 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 24f88cddf90..d80d1b1b68f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Mon Feb 15 18:24:33 UTC 2016
+# Fri Mar 11 19:59:13 UTC 2016
pkgbase = nvm-git
pkgdesc = Node Version Manager - Simple bash script to manage multiple active node.js versions (git sources)
- pkgver = 0.31.0.r0.g2176894
+ pkgver = 0.31.0.r5.g8fb4ee0
pkgrel = 1
url = https://github.com/creationix/nvm
install = nvm-git.install
@@ -14,8 +14,10 @@ pkgbase = nvm-git
conflicts = nvm
source = nvm-git::git+https://github.com/creationix/nvm.git
source = init-nvm.sh
+ source = install-nvm-exec
md5sums = SKIP
- md5sums = 359e7cff11f9053a1d380272591d29f3
+ md5sums = 1baa599ca9a724a42aff2bafb23a76ad
+ md5sums = 8f3c5b82f09636e9cf82d45d68c39cc6
pkgname = nvm-git
diff --git a/PKGBUILD b/PKGBUILD
index d0f773de11f..ebae034ccde 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Tom Wadley <tom@tomwadley.net>
pkgname=nvm-git
-pkgver=0.31.0.r0.g2176894
+pkgver=0.31.0.r5.g8fb4ee0
pkgrel=1
pkgdesc="Node Version Manager - Simple bash script to manage multiple active node.js versions (git sources)"
url="https://github.com/creationix/nvm"
@@ -13,9 +13,11 @@ conflicts=('nvm')
provides=('nvm')
install="${pkgname}.install"
source=("$pkgname::git+https://github.com/creationix/nvm.git"
- "init-nvm.sh")
+ "init-nvm.sh"
+ "install-nvm-exec")
md5sums=('SKIP'
- '359e7cff11f9053a1d380272591d29f3')
+ '1baa599ca9a724a42aff2bafb23a76ad'
+ '8f3c5b82f09636e9cf82d45d68c39cc6')
pkgver() {
cd "$pkgname"
@@ -28,11 +30,17 @@ package() {
# convenience script
install -Dm644 init-nvm.sh "$pkgdir/usr/share/nvm/init-nvm.sh"
+ # companion script which installs nvm-exec in NVM_DIR where upstream expects it
+ install -Dm644 install-nvm-exec "$pkgdir/usr/share/nvm/install-nvm-exec"
+
cd "${pkgname}"
# nvm itself
install -Dm644 nvm.sh "$pkgdir/usr/share/nvm/nvm.sh"
+ # nvm-exec script for 'nvm exec' command
+ install -Dm755 nvm-exec "$pkgdir/usr/share/nvm/nvm-exec"
+
# bash completion
install -Dm644 bash_completion "$pkgdir/usr/share/nvm/bash_completion"
diff --git a/init-nvm.sh b/init-nvm.sh
index c1c5d9e9745..90da3964fdf 100644
--- a/init-nvm.sh
+++ b/init-nvm.sh
@@ -1,3 +1,4 @@
export NVM_DIR="$HOME/.nvm"
source /usr/share/nvm/nvm.sh
source /usr/share/nvm/bash_completion
+source /usr/share/nvm/install-nvm-exec
diff --git a/install-nvm-exec b/install-nvm-exec
new file mode 100644
index 00000000000..e9551f94fcb
--- /dev/null
+++ b/install-nvm-exec
@@ -0,0 +1,3 @@
+# Creates an nvm-exec script in NVM_DIR which passes through to the installed nvm-exec
+
+[ -e "$NVM_DIR/nvm-exec" ] || (mkdir -p "$NVM_DIR" && (echo '/usr/share/nvm/nvm-exec "$@"' > "$NVM_DIR/nvm-exec") && chmod +x "$NVM_DIR/nvm-exec")