mirror of
https://gitee.com/RubyMetric/nvm-cn.git
synced 2025-12-25 20:02:45 +00:00
Check Git first
This commit is contained in:
parent
7482285316
commit
504da9d5e2
10
install.sh
10
install.sh
|
|
@ -4,7 +4,7 @@
|
|||
# Authors : ccmywish <ccmywish@qq.com>
|
||||
# aifuxi <aifuxi.js@gmail.com>
|
||||
# Created on : <2021-01-06>
|
||||
# Last modified : <2023-05-01>
|
||||
# Last modified : <2023-05-09>
|
||||
#
|
||||
# install:
|
||||
#
|
||||
|
|
@ -13,7 +13,10 @@
|
|||
# ----------
|
||||
# Changelog:
|
||||
#
|
||||
# Note that, the '@user' represents the user id of Gitee public service.
|
||||
#
|
||||
# ~> v0.1.0
|
||||
# <2023-05-09> Check Git first by @ccmywish, idea by @zhdong_admin
|
||||
# <2023-05-01> Update nvm repo source by @ccmywish
|
||||
# <2022-11-14> Update Node.JS mirror source by @aifuxi
|
||||
# <2021-01-06> Create file by @ccmywish
|
||||
|
|
@ -22,6 +25,11 @@
|
|||
# Exit on error
|
||||
set -e
|
||||
|
||||
if ! [ $(command -v "git") ]; then
|
||||
echo "=> 请您首先安装Git"
|
||||
exit 127
|
||||
fi
|
||||
|
||||
export NVM_DIR="$HOME/.nvm" && (
|
||||
echo "=> Git clone nvm"
|
||||
git clone https://gitee.com/mirrors_nvm-sh/nvm "$NVM_DIR"
|
||||
|
|
|
|||
Loading…
Reference in New Issue