refactor: 脚本及配置文件命名统一用 _ 分隔
将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名 改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为 nuance,并同步更新脚本内部引用与 README 路径。 Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
This commit is contained in:
31
nodejs_install.sh
Executable file
31
nodejs_install.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Usage: $(basename $0) [VERSION]"
|
||||
|
||||
defaultVERSION=18.12.1
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
VERSION=$1
|
||||
else
|
||||
echo "::*** Enter [nodejs version] or [leave blank] for default $defaultVERSION, enter [tools] to install C++ build tools"
|
||||
read -p "***:: " VERSION
|
||||
if [ ! $VERSION ]
|
||||
then
|
||||
VERSION=$defaultVERSION
|
||||
echo Use default nodejs version $defaultVERSION
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo apt update
|
||||
|
||||
if [ $VERSION != "tools" ]
|
||||
then
|
||||
echo "######## Installing nodejs v$VERSION ########"
|
||||
curl -sL https://deb.nodesource.com/setup_$VERSION.x | sudo bash - && sudo apt install nodejs -y
|
||||
# for centos: curl --silent --location https://rpm.nodesource.com/setup_$VERSION.x | sudo bash
|
||||
echo "######## nodejs v$VERSION installed completely! ########"
|
||||
fi
|
||||
|
||||
echo "######## Installing C++ build tools for Linux ########"
|
||||
sudo apt install wget curl gcc g++ make python -y # Debian 11 has no python by default.
|
||||
Reference in New Issue
Block a user