Skip to content

Instantly share code, notes, and snippets.

@chervand
Last active June 23, 2017 09:42
Show Gist options
  • Save chervand/b92b7d7f49fe978055f9 to your computer and use it in GitHub Desktop.
Save chervand/b92b7d7f49fe978055f9 to your computer and use it in GitHub Desktop.
Codeception bootstrap bash script
#!/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