usse/automate.sh
2024-04-15 19:31:08 +00:00

17 lines
449 B
Bash
Executable File

#! /bin/bash
CURR_DIR=$(pwd)
APP_DIR=/mnt/wintergreen_ssd1/projects/usse/usse
SCRAPE_DIR=${APP_DIR}/scrape
REACT_DIR=${APP_DIR}/react_usse
# Move panda_dump.bin
mv ${SCRAPE_DIR}/panda_dump.bin ${SCRAPE_DIR}/_panda_dump.bin
cd ${SCRAPE_DIR}
source ${SCRAPE_DIR}/venv/bin/activate && python ${SCRAPE_DIR}/usse.py && deactivate
cp ${SCRAPE_DIR}/out.json ${REACT_DIR}/src/locations.json
# Deploy new container
cd ${REACT_DIR}
./use_docker.sh rebuild