#!/bin/sh
git submodule update --init --recursive
mkdir -p ${HOME}/.nomadnetwork/storage/plugins/print3d/files/
mkdir -p ${HOME}/.nomadnetwork/storage/plugins/print3d/printers/
mkdir -p ${HOME}/.nomadnetwork/storage/plugins/print3d/cache/
mkdir -p ${HOME}/.nomadnetwork/storage/pages/print3d/
yes | cp -rf ./pages/* ${HOME}/.nomadnetwork/storage/pages/print3d

python3 -m venv venv && source venv/bin/activate && pip install -r fetcher/requirements.txt

echo "print3d installed, make sure to make pages/print3d/index.mu accessible!"
echo "remote print3d installed, make sure to make pages/print3d/remote_print.mu accessible!"
