将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名 改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为 nuance,并同步更新脚本内部引用与 README 路径。 Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
32 lines
899 B
Bash
Executable File
32 lines
899 B
Bash
Executable File
#!/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.
|