#!/bin/bash # A lot of this stuff should probably be done with npm, but I'm not a big fan of Node echo "Checking if pyodide is installed" if ! test -f ./WebServer/static/pyodide.js; then if ! test -f ./pyodide.tar.bz2; then curl -L --output pyodide.tar.bz2 https://github.com/pyodide/pyodide/releases/download/0.27.5/pyodide-0.27.5.tar.bz2 fi tar -xvf pyodide.tar.bz2 -C ./WebServer/static --strip-components=1 pyodide/pyodide.asm.js pyodide/pyodide.asm.wasm pyodide/pyodide.js pyodide/pyodide-lock.json pyodide/python_stdlib.zip pyodide/pycryptodome-3.20.0-cp35-abi3-pyodide_2024_0_wasm32.whl fi echo "Pyodide is installed" echo "Checking if socket.io is installed" if ! test -f ./WebServer/static/socket.io.min.js; then curl -L --output ./WebServer/static/socket.io.min.js https://cdn.socket.io/4.8.1/socket.io.min.js fi echo "Socket.io is installed" if [[ "$1" == "--download-only" ]]; then exit 0 fi echo "Building wheel file of SantaExchange package" cd src/ python setup.py bdist_wheel cd ../ cp ./src/dist/santaexchange-0.1-py3-none-any.whl ./WebServer/static/