From 9c5afac91c09c6bf8ed839d363a11cc90187b08a Mon Sep 17 00:00:00 2001 From: Gautier P Date: Thu, 21 Jan 2021 10:36:44 +0100 Subject: [PATCH] Add start/import scripts --- import.sh | 2 ++ start.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 import.sh create mode 100755 start.sh diff --git a/import.sh b/import.sh new file mode 100755 index 0000000..741f916 --- /dev/null +++ b/import.sh @@ -0,0 +1,2 @@ +#!/bin/sh -ev +python -m flatisfy import --config config.json --new-only -v "$@" diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..074a496 --- /dev/null +++ b/start.sh @@ -0,0 +1,18 @@ +#!/bin/sh -ev + +function clean_up { + + # Perform program exit housekeeping + kill $SERVE_PID $YARN_PID + exit +} + +python -m flatisfy serve --config config.json & +SERVE_PID=$! + +yarn watch:dev & +YARN_PID=$! + +trap clean_up SIGHUP SIGINT SIGTERM + +wait $SERVE_PID $YARN_PID