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

Simplify ls scripts

This commit is contained in:
mserranom 2024-07-31 10:38:28 +02:00
parent c377c94156
commit 97c2a195dd

View file

@ -40,8 +40,7 @@ function __main__() {
if [[ "${1:-null}" == "ls" ]] || [[ "${1:-null}" == "--ls" ]]; then
# runs `ls` excluding dirs and adds the name of the directory as prefix
local cmd="ls -p /overleaf/services/web/scripts | grep -v / | xargs -I {} echo 'scripts/{}'"
cmd="${cmd} && ls -p /overleaf/services/web/modules/server-ce-scripts/scripts | grep -v / | xargs -I {} echo 'modules/server-ce-scripts/scripts/{}'"
local cmd="cd /overleaf/services/web && find scripts/ modules/server-ce-scripts/scripts/ -maxdepth 1 -type f"
exec "$TOOLKIT_ROOT/bin/docker-compose" exec sharelatex bash -c "$cmd"
exit
fi