Compare commits
No commits in common. "d8cde143086dca709af0b68a472a0649d30c0319" and "8e4c802ac5001c1759d3080ffba942e02f6c4cde" have entirely different histories.
d8cde14308
...
8e4c802ac5
@ -350,21 +350,21 @@ configure_proxychains() {
|
||||
fi
|
||||
}
|
||||
|
||||
# configure_nodejs() {
|
||||
# [ -f /usr/local/bin/node ] && return
|
||||
# [ $offline -eq 1 ] && return
|
||||
configure_nodejs() {
|
||||
[ -f /usr/local/bin/node ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
|
||||
# if confirm_action "要安装 nodejs 吗?" "Y"; then
|
||||
# local version="v20.10.0"
|
||||
# local tarname="node-$version-linux-x64"
|
||||
# wget https://nodejs.org/dist/$version/$tarname.tar.xz -O $tempdir/$tarname.tar.xz
|
||||
# tar -xf $tempdir/$tarname.tar.xz -C $tempdir
|
||||
# sudo cp $tempdir/$tarname/bin/node /usr/local/bin/node
|
||||
# sudo cp $tempdir/$tarname/bin/npm /usr/local/bin/npm
|
||||
# rm $tempdir/$tarname.tar.xz
|
||||
# rm $tempdir/$tarname -r
|
||||
# fi
|
||||
# }
|
||||
if confirm_action "要安装 nodejs 吗?" "Y"; then
|
||||
local version="v20.10.0"
|
||||
local tarname="node-$version-linux-x64"
|
||||
wget https://nodejs.org/dist/$version/$tarname.tar.xz -O $tempdir/$tarname.tar.xz
|
||||
tar -xf $tempdir/$tarname.tar.xz -C $tempdir
|
||||
sudo cp $tempdir/$tarname/bin/node /usr/local/bin/node
|
||||
sudo cp $tempdir/$tarname/bin/npm /usr/local/bin/npm
|
||||
rm $tempdir/$tarname.tar.xz
|
||||
rm $tempdir/$tarname -r
|
||||
fi
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
|
||||
@ -409,7 +409,7 @@ configure_nano
|
||||
configure_vim
|
||||
configure_zsh
|
||||
configure_tmux
|
||||
# configure_nodejs
|
||||
configure_nodejs
|
||||
configure_docker
|
||||
configure_fail2ban
|
||||
configure_iptables
|
||||
|
||||
@ -71,7 +71,7 @@ configure_nvm() {
|
||||
[ -d ~/.nvm/.git ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
|
||||
if confirm_action "要安装 nvm / nodejs 吗?" "N"; then
|
||||
if confirm_action "要安装 nvm 吗?" "N"; then
|
||||
git_clone nvm-sh/nvm ~/.nvm --depth=1
|
||||
\. $scriptdir/files/install-nvm.sh
|
||||
\. ~/.nvm/nvm.sh
|
||||
@ -79,7 +79,6 @@ configure_nvm() {
|
||||
nvm install lts/iron
|
||||
nvm alias default lts/iron
|
||||
nvm install-latest-npm
|
||||
echo "registry=https://registry.npmmirror.com" > ~/.npmrc
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ if command_exists iptables; then
|
||||
fi
|
||||
fi
|
||||
|
||||
command_exists trash-put && alias rm='trash-put' && alias rmrm='/usr/bin/rm'
|
||||
command_exists trash-put && alias rm='trash-put'
|
||||
command_exists batcat && alias cat='batcat'
|
||||
command_exists fdfind && alias fd='fdfind'
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user