-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created check_requirements.sh #3028 #3054
Conversation
printf "Docker "; | ||
if [[ $(which docker) && $(docker --version) ]]; then | ||
printf "is installed" | ||
else | ||
printf "needs to be installed" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of leaving these at github comments, you can add them as comments in the actual script. i think it's worth it because it will help the next person who reads it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually. i take it back. since you're printing it, it's pretty clear what does what.
desired="14" | ||
printf "Java "; | ||
if [[ "$(which java)" && "$(java --version)" ]]; | ||
then | ||
printf "installed" | ||
str="$(java --version)" | ||
IFS=' ' read -ra array <<< "${str}" | ||
version="${array[1]}" | ||
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]]; | ||
then | ||
printf " and functional" | ||
else | ||
printf " but not functional, must have version ${desired} at least" | ||
fi | ||
else | ||
printf "not installed, must have version ${desired} at least" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java
printf "JQ "; | ||
if [[ $(which jq) && $(jq --version) ]]; then | ||
printf "is installed" | ||
else | ||
printf "needs to be installed" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JQ
desired="20.1" | ||
printf "Pip "; | ||
if [[ "$(which pip)" && "$(pip --version)" ]]; | ||
then | ||
printf "installed" | ||
str="$(pip --version)" | ||
IFS=' ' read -ra array <<< "${str}" | ||
version="${array[1]}" | ||
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]]; | ||
then | ||
printf " and functional" | ||
else | ||
printf " but not functional, must have version ${desired} at least" | ||
fi | ||
else | ||
printf "not installed, must have version ${desired} at least" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIP
desired="3.7.9" | ||
printf "Python "; | ||
if [[ "$(which python3)" && "$(python3 --version)" ]]; | ||
then | ||
printf "installed" | ||
str="$(python3 --version)" | ||
IFS=' ' read -ra array <<< "${str}" | ||
version="${array[1]}" | ||
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]]; | ||
then | ||
printf " and functional" | ||
else | ||
printf " but not functional, must have version ${desired} at least" | ||
fi | ||
else | ||
printf "not installed, must have version ${desired} at least" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PYTHON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks great, @nclsbayona ! thanks for contributing this. i left 1 very minor comment. once you address them, i'd be happy to merge this!
printf "Docker "; | ||
if [[ $(which docker) && $(docker --version) ]]; then | ||
printf "is installed" | ||
else | ||
printf "needs to be installed" | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of leaving these at github comments, you can add them as comments in the actual script. i think it's worth it because it will help the next person who reads it!
Actually I think this is ready to go as it is! Merging it. |
What
Contributing what is asked for in #3028 .
How
To achieve a solution, a bash script was created in the directory ./tools/bin with the name check_requirements.sh
Pre-merge Checklist
Don't think there were any pre-requisites, since its new and it's not referenced by any other component.
Recommended reading order