From cd94e215d410d9355b9cf8cae2c2055af4f3831a Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Mon, 15 Nov 2021 09:07:40 +0100 Subject: [PATCH] Improve dev.sh script --- engine/dev.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/engine/dev.sh b/engine/dev.sh index 40659bf..909ea2e 100755 --- a/engine/dev.sh +++ b/engine/dev.sh @@ -1,5 +1,8 @@ #!/usr/bin/env zsh +cd "$(git rev-parse --show-toplevel)" || exit 1 +source ./engine/envvars.sh + ## colors for tput # black=0 red=1 @@ -13,7 +16,11 @@ green() { printf "$(tput setaf $green)%s$(tput sgr0)" "$*" } yellow() { printf "$(tput setaf $yellow)%s$(tput sgr0)" "$*" } blue() { printf "$(tput setaf $blue)%s$(tput sgr0)" "$*" } -tee >(lorri watch | sed 's/^/[lorri] /' ) \ - >(./engine/serve.sh | sed 's/^/[http] /') \ - >(./engine/auto-build.sh | sed 's/^/[make] /') \ - >(sleep 1 && open 'http://127.0.0.1:3077') +pipegreen() {while read line; do green $line; done} +pipeyellow() {while read line; do yellow $line; done} +pipeblue() {while read line; do blue $line; done} + +tee >(lorri watch | sed 's/^/[lorri] /' | pipegreen ) \ + >(./engine/serve.sh | sed 's/^/[http] /' | pipeyellow) \ + >(./engine/auto-build.sh | sed 's/^/[make] /' | pipeblue) \ + >(sleep 1 && open 'http://127.0.0.1:3000')