Last active
January 24, 2018 20:42
-
-
Save stuyam/7a705e469e2318e1c048b64b22d5276c to your computer and use it in GitHub Desktop.
When you run heroku command on a staging server it will be yellow, else it will be red.
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
SELECTED_TAB=$(osascript -e "tell application \"Terminal\" to get selected tab of window 1") | |
ALL_ARGS="'$*'" | |
if [[ $ALL_ARGS =~ stg|staging ]]; | |
then | |
echo "matches" | |
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {65280, 49408, 1792}"; | |
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {0, 0, 0}" | |
else | |
echo "doesn't match" | |
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {56320, 13568, 17664}"; | |
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {65280, 65280, 65280}" | |
fi | |
/usr/local/bin/heroku $@; | |
osascript -e "tell application \"Terminal\" to set background color of $SELECTED_TAB to {0, 0, 0}"; | |
osascript -e "tell application \"Terminal\" to set normal text color of $SELECTED_TAB to {0, 63993, 0}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment