Add bashbrew as the entrypoint to make using the image easier

This commit is contained in:
Stuart Clark 2016-06-26 15:42:13 +01:00
parent cae164741c
commit d77545492d
1 changed files with 14 additions and 0 deletions

14
bashbrew-entrypoint.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
set -e
if [ "${1:0:1}" = '-' ]; then
set -- bashbrew "$@"
fi
# if our command is a valid bashbrew subcommand, let's invoke it through bashbrew instead
# (this allows for "docker run bashbrew build", etc)
if bashbrew "$1" --help > /dev/null 2>&1; then
set -- bashbrew "$@"
fi
exec "$@"