Skip to content

Commit

Permalink
nvm: update to 0.39.7
Browse files Browse the repository at this point in the history
- Drop `hash -r' in as AOSC OS prohibits command hashing by default.
- Lint build script to make it more readable.
  • Loading branch information
MingcongBai committed Jan 7, 2024
1 parent 7c57629 commit 2ac70a0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 12 deletions.
19 changes: 12 additions & 7 deletions lang-js/nvm/autobuild/build
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
abinfo "Installing nvm.sh, bash completion and doc..."
install -Dvm644 "$SRCDIR"/nvm.sh "$PKGDIR"/usr/share/nvm/nvm.sh
install -Dvm644 "$SRCDIR"/bash_completion "$PKGDIR"/usr/share/bash-completion/completions/nvm
install -Dvm644 "$SRCDIR"/*.md -t "$PKGDIR"/usr/share/doc/nvm/
abinfo "Installing nvm.sh, bash completion, and documentation ..."
install -Dvm644 "$SRCDIR"/nvm.sh \
"$PKGDIR"/usr/share/nvm/nvm.sh
install -Dvm644 "$SRCDIR"/bash_completion \
"$PKGDIR"/usr/share/bash-completion/completions/nvm
install -Dvm644 "$SRCDIR"/*.md \
-t "$PKGDIR"/usr/share/doc/nvm/

abinfo "Creating symlink to nvm.sh in bashrc.d and zshrc.d"
abinfo "Creating symlink to nvm.sh in bashrc.d and zshrc.d ..."
mkdir -pv "$PKGDIR"/etc/{bashrc.d,zsh/zshrc.d}
ln -vs ../../usr/share/nvm/nvm.sh "$PKGDIR"/etc/bashrc.d/30-nvm
ln -vs ../../../usr/share/nvm/nvm.sh "$PKGDIR"/etc/zsh/zshrc.d/30-nvm
ln -vs ../../usr/share/nvm/nvm.sh \
"$PKGDIR"/etc/bashrc.d/30-nvm
ln -vs ../../../usr/share/nvm/nvm.sh \
"$PKGDIR"/etc/zsh/zshrc.d/30-nvm
1 change: 0 additions & 1 deletion lang-js/nvm/autobuild/defines
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ PKGDES="NodeJS Version Manager"
PKGDEP="bash wget curl"

ABHOST=noarch

32 changes: 32 additions & 0 deletions lang-js/nvm/autobuild/patches/0001-nvm.sh-drop-hash-r.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From a7185ed2ae440717e29cde5d923b62d621be03f9 Mon Sep 17 00:00:00 2001
From: Mingcong Bai <jeffbai@aosc.xyz>
Date: Sat, 6 Jan 2024 22:53:21 -0800
Subject: [PATCH] nvm.sh: drop hash -r

---
nvm.sh | 2 --
1 file changed, 2 deletions(-)

diff --git a/nvm.sh b/nvm.sh
index 2e4378f..cb4dda5 100644
--- a/nvm.sh
+++ b/nvm.sh
@@ -3565,7 +3565,6 @@ nvm() {
fi
else
export PATH="${NEWPATH}"
- \hash -r
if [ "${NVM_SILENT:-0}" -ne 1 ]; then
nvm_echo "${NVM_DIR}/*/bin removed from \${PATH}"
fi
@@ -3697,7 +3696,6 @@ nvm() {
export MANPATH
fi
export PATH
- \hash -r
export NVM_BIN="${NVM_VERSION_DIR}/bin"
export NVM_INC="${NVM_VERSION_DIR}/include/node"
if [ "${NVM_SYMLINK_CURRENT-}" = true ]; then
--
2.39.1

7 changes: 3 additions & 4 deletions lang-js/nvm/spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
VER=0.37.0
REL=2
SRCS="tbl::https://github.com/creationix/nvm/archive/v$VER.tar.gz"
CHKSUMS="sha256::c22fb788a64ed48f6f44ebd7ba6c796471a1413eee085adfb7493b553ae05a09"
VER=0.39.7
SRCS="git::commit=tags/v$VER::https://github.com/creationix/nvm"
CHKSUMS="SKIP"
CHKUPDATE="anitya::id=229016"

0 comments on commit 2ac70a0

Please sign in to comment.