Add warning messages and error out if wget/curl available when needed.

This commit is contained in:
Ben Fox-Moore 2015-07-21 23:59:24 +02:00
parent 128b114ad8
commit df6e049de6

View File

@ -18,9 +18,17 @@ if ! (is_executable npm && is_executable node && is_executable git); then
elif is_executable port; then
port install nodejs git
elif is_executable apt-get; then
if ! is_executable wget; then
errcho "wget not available. Please install wget first, then run this script again."
exit 1
fi
wget -qO- https://deb.nodesource.com/setup | sudo bash - # Adds NodeSource repository to dpkg
sudo apt-get install -y nodejs git
elif is_executable yum; then
if ! is_executable curl; then
errcho "curl not available. Please install curl first, then run this script again."
exit 1
fi
curl -sL https://rpm.nodesource.com/setup | bash - # Adds NodeSource repository to yum
sudo yum install -y nodejs git
elif is_executable emerge; then