mirror of
https://github.com/overleaf/toolkit.git
synced 2025-04-19 15:28:06 +02:00
Merge branch 'sk-up-flags'
This commit is contained in:
commit
0c2df5a238
1 changed files with 14 additions and 1 deletions
15
bin/up
15
bin/up
|
@ -15,6 +15,15 @@ if [[ ! -d "$TOOLKIT_ROOT/bin" ]] || [[ ! -d "$TOOLKIT_ROOT/config" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
function usage() {
|
||||
echo "Usage: bin/up [FLAGS...]"
|
||||
echo ""
|
||||
echo "A wrapper around 'docker-compose up'."
|
||||
echo ""
|
||||
echo "This program will pass any extra flags to docker-compose,"
|
||||
echo "for example: 'bin/up -d' will run in detached mode"
|
||||
}
|
||||
|
||||
function check_config() {
|
||||
if [[ ! -f "$TOOLKIT_ROOT/config/overleaf.rc" ]] \
|
||||
|| [[ ! -f "$TOOLKIT_ROOT/config/variables.env" ]]; then
|
||||
|
@ -24,8 +33,12 @@ function check_config() {
|
|||
}
|
||||
|
||||
function __main__() {
|
||||
if [[ "${1:-null}" == "help" ]] || [[ "${1:-null}" == "--help" ]]; then
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
check_config
|
||||
exec "$TOOLKIT_ROOT/bin/docker-compose" up
|
||||
exec "$TOOLKIT_ROOT/bin/docker-compose" up "$@"
|
||||
}
|
||||
|
||||
__main__ "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue