1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 23:38:06 +02:00

Fix pathing in bin/mongo

This commit is contained in:
Shane Kilkelly 2020-07-16 09:44:30 +01:00
parent 684a08806b
commit 8ea4e05e9f

View file

@ -2,8 +2,17 @@
set -euo pipefail
#### Detect Toolkit Project Root ####
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
TOOLKIT_ROOT="$(realpath "$SCRIPT_DIR/..")"
if [[ ! -d "$TOOLKIT_ROOT/bin" ]] || [[ ! -d "$TOOLKIT_ROOT/config" ]]; then
echo "ERROR: could not find root of overleaf-toolkit project (inferred project root as '$TOOLKIT_ROOT')"
exit 1
fi
function __main__() {
exec ./bin/docker-compose exec mongo mongo
exec "$TOOLKIT_ROOT/bin/docker-compose" exec mongo mongo
}
__main__ "$@"