diff options
Diffstat (limited to 'record.sh')
-rwxr-xr-x | record.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/record.sh b/record.sh new file mode 100755 index 0000000..ce866da --- /dev/null +++ b/record.sh @@ -0,0 +1,15 @@ +#!/bin/bash -eu + +FIFO_PATH="/tmp/hestia-listening" + +if [[ -p "$FIFO_PATH" ]]; then + echo >> "$FIFO_PATH" +else + SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + MODULE_NAME=$(basename "$SCRIPT_DIR") + cd "$SCRIPT_DIR" + source venv/bin/activate + cd .. + python -m "$MODULE_NAME" +fi + |