mirror of https://github.com/balkian/dotfiles.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
274 B
Plaintext
22 lines
274 B
Plaintext
9 years ago
|
#!/bin/sh
|
||
|
|
||
|
CWD=$PWD
|
||
|
if [ -z "$CONTAINER" ];
|
||
|
then
|
||
|
CONTAINER=main
|
||
|
fi
|
||
|
|
||
|
while [ -e "$PWD" -a "$PWD" != "/" ]
|
||
|
do
|
||
|
if [ -e "$PWD/docker-compose.yml" ]; then
|
||
|
docker-compose run --rm main $*
|
||
|
exit $?
|
||
|
else
|
||
|
cd `dirname $PWD`
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
cd $CWD
|
||
|
|
||
|
eval $*
|