summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Wadley2019-02-07 16:23:46 -0600
committerTom Wadley2019-02-07 16:33:30 -0600
commit95a93f91df964680ef3b1e8d5a3c2c54e93a8743 (patch)
treed3ff13c6f047eac489d9486e8547458900de7b2e
parent64978bad0cc19f8a2af3816e5670c449e701af70 (diff)
downloadaur-95a93f91df964680ef3b1e8d5a3c2c54e93a8743.tar.gz
Create nvm.sh symlink under NVM_DIR for third party scripts that expect it to be there
- Now that nvm.sh exists under NVM_DIR, nvm-exec can also just be a symlink. - Modernize post install documentation - Remove unused function from PKGBUILD
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--install-nvm-exec7
-rw-r--r--nvm.install6
4 files changed, 11 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2197488b885..c6e836a5241 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvm
pkgdesc = Node Version Manager - Simple bash script to manage multiple active node.js versions
pkgver = 0.34.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/creationix/nvm
install = nvm.install
arch = any
@@ -12,7 +12,7 @@ pkgbase = nvm
source = install-nvm-exec
sha256sums = 7785788fadae495cd65c7612f4b4ed16955048eaebfe69a6009e5e3265b280f0
sha256sums = 692317bfd036557f59543fef9b67ff38de68208d30361fe385291f58d3ac0425
- sha256sums = a0d249e4a906b0406cc5867c86b9860b820a4ad5f29e37f377349c1d5b6eba51
+ sha256sums = 795d3f6ad3076aa4b0bb9cc48a2e6e79331d121278a887667fb707181a54a10b
pkgname = nvm
diff --git a/PKGBUILD b/PKGBUILD
index cd1a82b12f8..fe4253550d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=nvm
pkgver=0.34.0
-pkgrel=1
+pkgrel=2
pkgdesc="Node Version Manager - Simple bash script to manage multiple active node.js versions"
url="https://github.com/creationix/nvm"
arch=('any')
@@ -14,11 +14,7 @@ source=("https://github.com/creationix/nvm/archive/v${pkgver}.zip"
"install-nvm-exec")
sha256sums=('7785788fadae495cd65c7612f4b4ed16955048eaebfe69a6009e5e3265b280f0'
'692317bfd036557f59543fef9b67ff38de68208d30361fe385291f58d3ac0425'
- 'a0d249e4a906b0406cc5867c86b9860b820a4ad5f29e37f377349c1d5b6eba51')
-
-build() {
- cd "${pkgname}-${pkgver}"
-}
+ '795d3f6ad3076aa4b0bb9cc48a2e6e79331d121278a887667fb707181a54a10b')
package() {
cd "${srcdir}"
@@ -26,7 +22,7 @@ package() {
# convenience script
install -Dm644 init-nvm.sh "$pkgdir/usr/share/$pkgname/init-nvm.sh"
- # companion script which installs nvm-exec in NVM_DIR where upstream expects it
+ # companion script which installs symlinks in NVM_DIR (see comment in script)
install -Dm644 install-nvm-exec "$pkgdir/usr/share/$pkgname/install-nvm-exec"
cd "${pkgname}-${pkgver}"
diff --git a/install-nvm-exec b/install-nvm-exec
index e9551f94fcb..214ff4a41c8 100644
--- a/install-nvm-exec
+++ b/install-nvm-exec
@@ -1,3 +1,4 @@
-# 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")
+# "nvm exec" and certain 3rd party scripts expect "nvm.sh" and "nvm-exec" to exist under $NVM_DIR
+[ -e "$NVM_DIR" ] || mkdir -p "$NVM_DIR"
+[ -e "$NVM_DIR/nvm.sh" ] || ln -s /usr/share/nvm/nvm.sh "$NVM_DIR/nvm.sh"
+[ -e "$NVM_DIR/nvm-exec" ] || ln -s /usr/share/nvm/nvm-exec "$NVM_DIR/nvm-exec"
diff --git a/nvm.install b/nvm.install
index aab3f1ff6d5..326f1b10ca6 100644
--- a/nvm.install
+++ b/nvm.install
@@ -7,10 +7,8 @@ or similar depending on your shell (and then restart your shell):
echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.bashrc
echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.zshrc
-You can now install node.js versions (e.g. nvm install 5.0) and
-activate them (e.g. nvm use 5.0). You may want to activate your
-preferred node.js version in your .bashrc (or similar) after
-sourcing init-nvm.sh.
+You can now install node.js versions (e.g. nvm install 10) and
+activate them (e.g. nvm use 10).
init-nvm.sh is a convenience script which does the following:
"