node-installer.sh/setup-deps-ubuntu.bash

41 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2015-01-15 22:41:04 +00:00
#!/bin/bash
# curl -fsSL https://ldsconnect.org/setup-linux.bash | bash -c
# Not every platform has or needs sudo, gotta save them O(1)s...
sudo_cmd=""
((EUID)) && [[ -z "$ANDROID_ROOT" ]] && sudo_cmd="sudo"
2015-01-15 22:41:04 +00:00
NO_FAIL2BAN=${1}
echo ""
echo ""
2015-01-15 22:52:35 +00:00
echo "Checking for"
echo ""
echo " * build-essential"
echo " * rsync"
echo " * wget"
echo " * curl"
echo " * pkg-config"
2015-01-15 22:53:55 +00:00
echo " * node"
2015-01-15 22:52:35 +00:00
echo " * jshint"
echo ""
2015-01-15 22:41:04 +00:00
echo "updating apt-get..."
$sudo_cmd bash -c "apt-get update -qq -y < /dev/null" > /dev/null
2015-01-15 22:41:04 +00:00
# fail2ban
2017-05-25 17:15:30 +00:00
#if [ -z "$(which fail2ban-server | grep fail2ban)" ]; then
# if [ -z "${NO_FAIL2BAN}" ]; then
# echo "installing fail2ban..."
# sudo bash -c "apt-get install -qq -y fail2ban < /dev/null" > /dev/null
# fi
#fi
2015-01-15 22:41:04 +00:00
# git, wget, curl, build-essential
2017-05-25 17:50:45 +00:00
if [ -z "$(type -p pkg-config)" ] || [ -z "$(type -p git)" ] || [ -z "$(type -p wget)" ] || [ -z "$(type -p curl)" ] || [ -z "$(type -p gcc)" ] || [ -z "$(type -p rsync)" ] || [ -z "$(type -p python)" ]
2015-01-15 22:41:04 +00:00
then
echo "installing git, wget, curl, build-essential, rsync, pkg-config, python..."
$sudo_cmd bash -c "apt-get install -qq -y git wget curl build-essential rsync pkg-config python < /dev/null" > /dev/null 2>/dev/null
2015-01-15 22:41:04 +00:00
fi