Created
March 30, 2022 16:12
-
-
Save brettscott/2880560a33629b37f32bbecc59ff5a32 to your computer and use it in GitHub Desktop.
Script to check if dev machine properly configure to run Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function bin_check() { | |
which $1 > /dev/null; exists=$? | |
[ $exists -ne 0 ] && echo -e "\nERROR: $1 not found" && exit 1 | |
printf "%-20s" $1 | |
[ $exists -eq 0 ] && echo "OK" || echo "MISSING" | |
} | |
echo "Checking for required binaries..." | |
echo | |
bin_check "python3" | |
bin_check "npm" | |
bin_check "docker" | |
bin_check "docker-compose" | |
bin_check "git" | |
bin_check "make" | |
echo | |
echo "System check complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment