Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

直接退出 不会执行之后的命令 #21

Open
Jue-snow opened this issue Jan 11, 2019 · 1 comment
Open

直接退出 不会执行之后的命令 #21

Jue-snow opened this issue Jan 11, 2019 · 1 comment

Comments

@Jue-snow
Copy link

exit

@Jue-snow
Copy link
Author

对原脚本的修改

#!/bin/sh

# Variables
r='\e[31m' # red
y='\e[33m' # yellow
bu='\e[34m' # blue
g='\e[32m'
endc='\e[0m'

echo -e "${g}Switch to ROOT to add node repo ${endc}" 
su - root -c "curl -sL https://rpm.nodesource.com/setup_10.x | bash -"

echo -e "${g}Finished add node repo${endc}"
sleep 2
# install
echo -e "${r}Install Nodejs${endc}"
sudo dnf install nodejs -y

echo -e "${bu}Install yarn${endc}"
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo dnf install yarn -y

# check node npm yarn version
echo -e " ${r}node version:$(node --version)${endc} \n ${y}npm version:$(npm --version)${endc} \n ${bu}yarn version:$(yarn --version)${endc}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant