Last active
June 23, 2017 09:42
-
-
Save chervand/b92b7d7f49fe978055f9 to your computer and use it in GitHub Desktop.
Codeception bootstrap bash script
This file contains hidden or 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
#!/usr/bin/env bash | |
# Codeception bootstrap script | |
# http://codeception.com/ | |
# https://gist.github.com/chervand/b92b7d7f49fe978055f9 | |
function trace () { | |
echo "... ${@}" && "$@" | |
} | |
_source="$(readlink -f ${BASH_SOURCE[0]})" | |
_scriptPath="$(dirname ${_source})" | |
trace cd ${_scriptPath}/tests | |
if [ -x "$(command -v codecept)" ]; then | |
trace codecept $@ | |
elif [ -x ./../vendor/bin/codecept ]; then | |
trace ./../vendor/bin/codecept $@ | |
else | |
if [ ! -f codecept.phar ]; then | |
wget http://codeception.com/codecept.phar | |
fi | |
trace php codecept.phar $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment