Skip to content

Instantly share code, notes, and snippets.

@davidhemphill
Last active February 17, 2020 08:36
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidhemphill/e23855fd1ee6b864c6ab202a91705b27 to your computer and use it in GitHub Desktop.
Save davidhemphill/e23855fd1ee6b864c6ab202a91705b27 to your computer and use it in GitHub Desktop.
alias phpunit='function __phpunit() {
OUTPUT="$(blink1-tool --list)"
EXPECTED="no blink(1) devices found"
if [ "$OUTPUT" = "$EXPECTED" ]
then
phpunit "$@"
else
blink1-tool --blue && phpunit "$@" && blink1-tool --green && afplay ~/Music/godlike.mp3 || blink1-tool --red
fi
}; __phpunit'
alias phpunit='function __phpunit() {
OUTPUT="$(blink1-tool --list)"
EXPECTED="no blink(1) devices found"
if [ "$OUTPUT" = "$EXPECTED" ]
then
phpunit "$@"
else
blink1-tool --blue && phpunit "$@" && blink1-tool --green || blink1-tool --red
fi
}; __phpunit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment