Skip to content

Instantly share code, notes, and snippets.

@chaos-zhu
Last active June 9, 2022 02:21
Show Gist options
  • Save chaos-zhu/5c7e845d7b6363a5986d89cb95682182 to your computer and use it in GitHub Desktop.
Save chaos-zhu/5c7e845d7b6363a5986d89cb95682182 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$(id -u)" != "0" ] ; then
echo "***********************需root权限***********************"
exit 1
fi
# 编写中...
echo '开始安装nvm'
cd ~
wget -qO- https://ghproxy.com/https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
if [ $? != "0" ] ; then
echo '下载nvm失败'
exit 1
fi
cd ~/.nvm || exit
source nvm.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment