Mercurial > hg > beaglert
changeset 327:ccfcf1303f12 prerelease
make run (and similar) run from within the project folder
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 03 Jun 2016 17:09:26 +0100 |
parents | bd54819ccfa7 |
children | abd7795dad5d |
files | Makefile |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri Jun 03 17:01:36 2016 +0100 +++ b/Makefile Fri Jun 03 17:09:26 2016 +0100 @@ -187,19 +187,20 @@ runfg: run run: stop Bela - echo "Running $(RUN_COMMAND)" - $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND)" + @cd $(PROJECT_DIR) && $(RUN_COMMAND) runscreen: stop $(OUTPUT_FILE) - echo "Running $(RUN_COMMAND) in a screen" - screen -S $(SCREEN_NAME) -d -m $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND) in a screen" + @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -d -m $(RUN_COMMAND) runscreenfg: stop $(OUTPUT_FILE) - echo "Running $(RUN_COMMAND) in a screen" - screen -S $(SCREEN_NAME) -m $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND) in a screen" + @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -m $(RUN_COMMAND) FIFO_NAME=/tmp/belafifo runscreenfifo: stop $(OUTPUT_FILE) @echo "Running $(RUN_COMMAND), piping output to $(FIFO_NAME)" @rm -rf $(FIFO_NAME) @mkfifo $(FIFO_NAME) + @cd $(PROJECT_DIR) @screen -S $(SCREEN_NAME) -d -m stdbuf -e 0 -i 0 -o 0 bash -c "$(RUN_COMMAND) &> $(FIFO_NAME)" @cat /tmp/belafifo