mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-14 16:52:29 +00:00
22 lines
274 B
Bash
Executable File
22 lines
274 B
Bash
Executable File
#!/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 $*
|