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:
parent
684a08806b
commit
8ea4e05e9f
1 changed files with 10 additions and 1 deletions
11
bin/mongo
11
bin/mongo
|
@ -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__ "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue