Last active
August 29, 2015 14:27
-
-
Save djtech42/e1b0cc030b208b978538 to your computer and use it in GitHub Desktop.
Warn if there is more than one instance of Xcode running (Ex. Xcode and Xcode Beta are running at the same time)
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 | |
NUMOFLINES=`pgrep -ax Xcode | wc -l ` | |
if [ $NUMOFLINES -eq 1 ] | |
then | |
echo "Everything's fine. Only one instance of Xcode running." | |
elif [ $NUMOFLINES -eq 0 ] | |
then | |
echo "No instances of Xcode are running." | |
else | |
echo "Warning! $NUMOFLINES Xcode instances running" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment