Skip to content

Instantly share code, notes, and snippets.

@jacobthemyth

jacobthemyth/checkit.sh

Last active Aug 29, 2015
Embed
What would you like to do?
#!/bin/bash
echo -n "Checking OS version... "
if [[ $(sw_vers -productVersion) != 10.9.* ]]; then
echo "Your OS version is out of date."
exit 1
else
echo "YES"
fi
echo -n "Checking if XCode is installed... "
hash xcodebuild 2>/dev/null
if [ $? -ne 0 ]; then
echo "You don't have XCode installed"
exit 1
else
echo "YES"
fi
echo -n "Checking Homebrew is installed... "
hash brew 2>/dev/null
if [ $? -ne 0 ]; then
echo "You don't have Homebrew installed"
exit 1
else
echo "YES"
fi
echo -n "Checking git is installed... "
hash git 2>/dev/null
if [ $? -ne 0 ]; then
echo "You don't have git installed"
exit 1
else
echo "YES"
fi
echo -n "Checking hub is installed... "
hash hub 2>/dev/null
if [ $? -ne 0 ]; then
echo "You don't have hub installed"
exit 1
else
echo "YES"
fi
echo -n "Checking if Atom is installed... "
hash atom 2>/dev/null
if [ $? -ne 0 ]; then
echo "Atom is either not installed or misconfigured."
exit 1
else
echo "YES"
fi
echo -n "Checking if node is installed... "
hash node 2>/dev/null
if [ $? -ne 0 ]; then
echo "node isn't installed"
exit 1
else
echo "YES"
fi
echo -n "Checking if you have atom set up as your git editor... "
if [[ $(git config --global core.editor) != atom* ]]; then
echo "You don't have atom set as your git editor"
exit 1
else
echo "YES"
fi
echo "Finally, if you have SSH keys set up, you should see your GitHub username:"
ssh -T git@github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.