Browse Source

Add start/import scripts

Gautier P 6 months ago
parent
commit
9c5afac91c
2 changed files with 20 additions and 0 deletions
  1. 2
    0
      import.sh
  2. 18
    0
      start.sh

+ 2
- 0
import.sh View File

@@ -0,0 +1,2 @@
1
+#!/bin/sh -ev
2
+python -m flatisfy import --config config.json --new-only -v "$@"

+ 18
- 0
start.sh View File

@@ -0,0 +1,18 @@
1
+#!/bin/sh -ev
2
+
3
+function clean_up {
4
+
5
+    # Perform program exit housekeeping
6
+    kill $SERVE_PID $YARN_PID
7
+    exit
8
+}
9
+
10
+python -m flatisfy serve --config config.json &
11
+SERVE_PID=$!
12
+
13
+yarn watch:dev &
14
+YARN_PID=$!
15
+
16
+trap clean_up SIGHUP SIGINT SIGTERM
17
+
18
+wait $SERVE_PID $YARN_PID