diff --git a/examples/install.sh b/examples/install.sh index 79cb2b771..03ab5a953 100644 --- a/examples/install.sh +++ b/examples/install.sh @@ -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