better output

This commit is contained in:
AJ ONeal 2015-01-15 15:52:35 -07:00
parent 0ff11fbf72
commit 8a6a7ed83a
3 changed files with 22 additions and 24 deletions

View File

@ -5,6 +5,13 @@ NO_FAIL2BAN=${1}
echo "" echo ""
echo "" echo ""
echo "Checking for"
echo ""
echo " * XCode Command Line Tools"
echo " * wget"
echo " * pkg-config"
echo " * jshint"
echo ""
# XCode # XCode
# testing for which git, gcc, etc will not work because the tools are aliased to the install script # testing for which git, gcc, etc will not work because the tools are aliased to the install script
@ -31,8 +38,6 @@ if [ -z "$(xcode-select --print-path 2>/dev/null)" ] || [ -z "$(git --version 2>
echo "It looks like the other install is finishing up." echo "It looks like the other install is finishing up."
echo "This installation will begin in one minute." echo "This installation will begin in one minute."
sleep 60 sleep 60
else
echo "XCode Command Line Tools already installed"
fi fi
# homebrew # homebrew
@ -48,8 +53,6 @@ fi
if [ -z "$(which wget | grep wget)" ]; then if [ -z "$(which wget | grep wget)" ]; then
echo "installing wget..." echo "installing wget..."
brew install wget brew install wget
else
echo "wget already installed"
fi fi
# http://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.5) # http://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.5)
@ -64,6 +67,4 @@ fi
if [ -z "$(which pkg-config | grep pkg-config)" ]; then if [ -z "$(which pkg-config | grep pkg-config)" ]; then
echo "installing pkg-config..." echo "installing pkg-config..."
brew install pkg-config brew install pkg-config
else
echo "pkg-config already installed"
fi fi

View File

@ -6,6 +6,15 @@ NO_FAIL2BAN=${1}
echo "" echo ""
echo "" echo ""
echo "Checking for"
echo ""
echo " * build-essential"
echo " * rsync"
echo " * wget"
echo " * curl"
echo " * pkg-config"
echo " * jshint"
echo ""
echo "updating apt-get..." echo "updating apt-get..."
sudo bash -c "apt-get update -qq -y < /dev/null" > /dev/null sudo bash -c "apt-get update -qq -y < /dev/null" > /dev/null

View File

@ -138,7 +138,7 @@ esac
# Download installers # # Download installers #
####################### #######################
echo "${OS}" "${ARCH}" echo "Preparing to install io.js (and common development dependencies) for ${OS}" "${ARCH}"
if [ -n "$(which curl)" ]; then if [ -n "$(which curl)" ]; then
curl --silent "${BASE_URL}/setup-deps-${SETUP_FILE}.bash" \ curl --silent "${BASE_URL}/setup-deps-${SETUP_FILE}.bash" \
@ -210,24 +210,15 @@ if [ -z "$IOJS_VER" ]; then
IOJS_VER="v1.0.1" IOJS_VER="v1.0.1"
fi fi
if [ -n "$(which iojs 2>/dev/null || false)" ]; then
echo ""
echo "HEY, LISTEN:"
echo "io.js is already install as iojs $(iojs -v | grep v)"
echo ""
echo "to reinstall please first run:"
echo "sudo mv '$(which iojs)' '$(which iojs).$(iojs -v)'"
echo ""
fi
# #
# iojs # iojs
# #
if [ -n "$(which iojs | grep iojs 2>/dev/null)" ]; then if [ -n "$(which iojs | grep iojs 2>/dev/null)" ]; then
# iojs of some version is already installed # iojs of some version is already installed
if [ "${IOJS_VER}" == "$(iojs -v 2>/dev/null)" ]; then if [ "${IOJS_VER}" == "$(iojs -v 2>/dev/null)" ]; then
echo iojs ${IOJS_VER} already installed echo iojs ${IOJS_VER} is already installed
else else
echo ""
echo "HEY, LISTEN:" echo "HEY, LISTEN:"
echo "" echo ""
echo "io.js is already installed as iojs $(iojs -v | grep v)" echo "io.js is already installed as iojs $(iojs -v | grep v)"
@ -238,8 +229,6 @@ if [ -n "$(which iojs | grep iojs 2>/dev/null)" ]; then
IOJS_VER="" IOJS_VER=""
elif [ "$(node -v 2>/dev/null)" != "$(iojs -v 2>/dev/null)" ]; then elif [ "$(node -v 2>/dev/null)" != "$(iojs -v 2>/dev/null)" ]; then
# node of some version is already installed # node of some version is already installed
echo ""
echo "################################################################################"
echo "" echo ""
echo "HEY, LISTEN!" echo "HEY, LISTEN!"
echo "" echo ""
@ -247,10 +236,11 @@ elif [ "$(node -v 2>/dev/null)" != "$(iojs -v 2>/dev/null)" ]; then
echo "Backing up $(which node) as $(which node).$(node -v)" echo "Backing up $(which node) as $(which node).$(node -v)"
echo "(copy it back after the install if to maintain node.js and io.js separately)" echo "(copy it back after the install if to maintain node.js and io.js separately)"
echo "" echo ""
echo sudo mv "$(which node)" "$(which node).$(node -v)"
sleep 3 sleep 3
sudo mv "$(which node)" "$(which node).$(node -v)"
echo "################################################################################" echo "################################################################################"
echo sudo mv "$(which node)" "$(which node).$(node -v)"
echo "################################################################################"
sudo mv "$(which node)" "$(which node).$(node -v)"
echo "" echo ""
fi fi
@ -262,8 +252,6 @@ fi
if [ -z "$(which jshint | grep jshint)" ]; then if [ -z "$(which jshint | grep jshint)" ]; then
echo "installing jshint..." echo "installing jshint..."
npm install --silent jshint -g > /dev/null npm install --silent jshint -g > /dev/null
else
echo "jshint already installed"
fi fi
echo "" echo ""