[nN]) abortInstall "${red}==>${reset} Process stopped by user. To resume the install run the one-liner command again.";;
* )echo"Unrecognized option provided. Please provide either 'Y' or 'N'";
esac
done
}
function exe(){
echo"\$ $@";"$@"
}
function detectOS(){
if[["$OSTYPE"=="linux-gnu"]]
then
OS_TYPE="linux"
get_linux_dependencies
elif[["$OSTYPE"=="darwin"* ]]
then
OS_TYPE="osx"
get_osx_dependencies
else
OS_TYPE="win"
abortInstall "${red}==>${reset}${b}OS not supported:${reset} parity one-liner currently support OS X and Linux.\nFor instructions on installing parity on other platforms please visit ${u}${blue}http://ethcore.io/${reset}"
fi
echo
if[[$depCount==$depFound]]
then
green "Found all dependencies ($depFound/$depCount)"
else
if[[$canContinue==true]]
then
red "Some dependencies are missing ($depFound/$depCount)"
elif[[$canContinue==false&&$depFound==0]]
then
red "All dependencies are missing and cannot be auto-installed ($depFound/$depCount)"
abortInstall "$errorMessages";
elif[[$canContinue==false]]
then
red "Some dependencies which cannot be auto-installed are missing ($depFound/$depCount)"
errorMessages+="${red}==>${reset}${b}Mac OS version too old:${reset} eth requires OS X version ${red}$OSX_REQUIERED_VERSION${reset} at least in order to run.\n"
errorMessages+=" Please update the OS and reload the install process.\n"
}
function find_eth()
{
ETH_PATH=`which eth 2>/dev/null`
if[[ -f $ETH_PATH]]
then
check "Found eth: $ETH_PATH"
echo"$($ETH_PATH -V)"
isEth=true
else
uncheck "Eth is missing"
isEth=false
fi
}
function find_git()
{
depCount=$((depCount+1))
GIT_PATH=`which git 2>/dev/null`
if[[ -f $GIT_PATH]]
then
check "$($GIT_PATH --version)"
isGit=true
depFound=$((depFound+1))
else
uncheck "Git is missing"
isGit=false
fi
}
function find_ruby()
{
depCount=$((depCount+1))
RUBY_PATH=`which ruby 2>/dev/null`
if[[ -f $RUBY_PATH]]
then
RUBY_VERSION=`ruby -e "print RUBY_VERSION"`
check "Ruby ${RUBY_VERSION}"
isRuby=true
depFound=$((depFound+1))
else
uncheck "Ruby is missing 🔥"
isRuby=false
canContinue=false
errorMessages+="${red}==>${reset}${b}Couldn't find Ruby:${reset} Brew requires Ruby which could not be found.\n"
errorMessages+=" Please install Ruby using these instructions ${u}${blue}https://www.ruby-lang.org/en/documentation/installation/${reset}.\n"