22 lines
375 B
Bash
Executable File
22 lines
375 B
Bash
Executable File
#!/bin/bash
|
|
fail() {
|
|
echo "$*" >&2
|
|
exit 1
|
|
}
|
|
|
|
declare project=$1
|
|
|
|
if [[ "${project}" == "" ]]; then
|
|
echo "usage: ${0} PROJECT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
declare full_path=$(realpath "projects/${project}")
|
|
|
|
if ! docker compose exec -it \
|
|
"${project}" \
|
|
shell; then
|
|
fail "Unable to launch shell in '${project}'. Make sure it is running via './launch.sh ${project}'."
|
|
fi
|
|
|