diff options
author | Tom Wadley | 2019-02-07 16:39:28 -0600 |
---|---|---|
committer | Tom Wadley | 2019-02-07 16:44:18 -0600 |
commit | b3b930346d8e2b9b18f376d35eb72cef5434097f (patch) | |
tree | 7565c2dbe8e5a51be5568aadf9880d156cca1117 | |
parent | e2750a12f987a108f24789801ab73ca21bc58dfa (diff) | |
download | aur-b3b930346d8e2b9b18f376d35eb72cef5434097f.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
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | install-nvm-exec | 7 | ||||
-rw-r--r-- | nvm-git.install | 6 |
4 files changed, 13 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = nvm-git pkgdesc = Node Version Manager - Simple bash script to manage multiple active node.js versions (git sources) - pkgver = 0.34.0.r0.g3d9c31d - pkgrel = 1 + pkgver = 0.34.0.r13.ge1bb44f + pkgrel = 2 url = https://github.com/creationix/nvm install = nvm-git.install arch = any @@ -15,7 +15,7 @@ pkgbase = nvm-git source = install-nvm-exec sha256sums = SKIP sha256sums = 692317bfd036557f59543fef9b67ff38de68208d30361fe385291f58d3ac0425 - sha256sums = a0d249e4a906b0406cc5867c86b9860b820a4ad5f29e37f377349c1d5b6eba51 + sha256sums = 795d3f6ad3076aa4b0bb9cc48a2e6e79331d121278a887667fb707181a54a10b pkgname = nvm-git @@ -1,8 +1,8 @@ # Maintainer: Tom Wadley <tom@tomwadley.net> pkgname=nvm-git -pkgver=0.34.0.r0.g3d9c31d -pkgrel=1 +pkgver=0.34.0.r13.ge1bb44f +pkgrel=2 pkgdesc="Node Version Manager - Simple bash script to manage multiple active node.js versions (git sources)" url="https://github.com/creationix/nvm" arch=('any') @@ -17,7 +17,7 @@ source=("$pkgname::git+https://github.com/creationix/nvm.git" "install-nvm-exec") sha256sums=('SKIP' '692317bfd036557f59543fef9b67ff38de68208d30361fe385291f58d3ac0425' - 'a0d249e4a906b0406cc5867c86b9860b820a4ad5f29e37f377349c1d5b6eba51') + '795d3f6ad3076aa4b0bb9cc48a2e6e79331d121278a887667fb707181a54a10b') pkgver() { cd "$pkgname" @@ -30,7 +30,7 @@ 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 + # companion script which installs symlinks in NVM_DIR (see comment in script) install -Dm644 install-nvm-exec "$pkgdir/usr/share/nvm/install-nvm-exec" cd "${pkgname}" diff --git a/install-nvm-exec b/install-nvm-exec index e9551f94fcbf..214ff4a41c86 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-git.install b/nvm-git.install index aab3f1ff6d58..326f1b10ca65 100644 --- a/nvm-git.install +++ b/nvm-git.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: " |