mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-09 05:33:48 -05:00
Fixed IFS handling. Added messaging
This commit is contained in:
@@ -336,19 +336,24 @@ function help () {
|
|||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
|
|
||||||
function checkDependencies() {
|
function checkDependencies() {
|
||||||
if [ -n "$homebrewDependencies" ]; then
|
saveIFS=$IFS
|
||||||
|
IFS=$' \n\t'
|
||||||
|
if [ -n "${homebrewDependencies}" ]; then
|
||||||
|
warning "You are missing dependencies. We will now install them."
|
||||||
|
|
||||||
LISTINSTALLED="brew list"
|
LISTINSTALLED="brew list"
|
||||||
INSTALLCOMMAND="brew install"
|
INSTALLCOMMAND="brew install"
|
||||||
RECIPES="${homebrewDependencies}"
|
RECIPES=("${homebrewDependencies[@]}")
|
||||||
|
|
||||||
# Invoke functions from setupScriptFunctions.sh
|
# Invoke functions from setupScriptFunctions.sh
|
||||||
hasHomebrew
|
hasHomebrew
|
||||||
doInstall
|
doInstall
|
||||||
fi
|
fi
|
||||||
if [ -n "$caskDependencies" ]; then
|
if [ -n "$caskDependencies" ]; then
|
||||||
|
warning "You are missing dependencies. We will now install them."
|
||||||
LISTINSTALLED="brew cask list"
|
LISTINSTALLED="brew cask list"
|
||||||
INSTALLCOMMAND="brew cask install --appdir=/Applications"
|
INSTALLCOMMAND="brew cask install --appdir=/Applications"
|
||||||
RECIPES="${caskDependencies}"
|
RECIPES=("${caskDependencies[@]}")
|
||||||
|
|
||||||
# Invoke functions from setupScriptFunctions.sh
|
# Invoke functions from setupScriptFunctions.sh
|
||||||
hasHomebrew
|
hasHomebrew
|
||||||
@@ -356,12 +361,14 @@ function checkDependencies() {
|
|||||||
doInstall
|
doInstall
|
||||||
fi
|
fi
|
||||||
if [ -n "$gemDependencies" ]; then
|
if [ -n "$gemDependencies" ]; then
|
||||||
|
warning "You are missing dependencies. We will now install them."
|
||||||
LISTINSTALLED="gem list | awk '{print $1}'"
|
LISTINSTALLED="gem list | awk '{print $1}'"
|
||||||
INSTALLCOMMAND="gem install"
|
INSTALLCOMMAND="gem install"
|
||||||
RECIPES="${gemDependencies}"
|
RECIPES=("${gemDependencies[@]}")
|
||||||
# Invoke functions from setupScriptFunctions.sh
|
# Invoke functions from setupScriptFunctions.sh
|
||||||
doInstall
|
doInstall
|
||||||
fi
|
fi
|
||||||
|
IFS=$saveIFS
|
||||||
}
|
}
|
||||||
|
|
||||||
# pauseScript
|
# pauseScript
|
||||||
|
|||||||
Reference in New Issue
Block a user