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

Unnecessarily using sudo when logging as root #1331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions examples/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
# curl -o- https://raw.githubusercontent.com/amark/gun/master/examples/install.sh | bash

#debian/ubuntu
su -
apt-get install sudo -y
sudo apt-get update -y
sudo apt-get install curl git git-core screen -y
if [[ $(id -u) -ne 0 ]]; then
SUDO='sudo'
else
SUDO=''
fi

${SUDO} apt-get install sudo -y
${SUDO} apt-get update -y
${SUDO} apt-get install curl git git-core screen -y

#fedora/openSUSE
sudo yum check-update -y
sudo yum install curl git git-core screen -y
${SUDO} yum check-update -y
${SUDO} yum install curl git git-core screen -y

# install nodejs
git clone http://github.com/isaacs/nave.git
Expand Down