Skip to content

Instantly share code, notes, and snippets.

@brettscott
Created March 30, 2022 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettscott/2880560a33629b37f32bbecc59ff5a32 to your computer and use it in GitHub Desktop.
Save brettscott/2880560a33629b37f32bbecc59ff5a32 to your computer and use it in GitHub Desktop.
Script to check if dev machine properly configure to run Python
#!/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