#!/bin/bash
# Delete all temporary and build files

# Exit on error
set -e

start=$SECONDS

# Tidy up
echo "Tidying tutorials..."
./clean_outputs.py

echo "Removing build files..."
rm -rvf .quarto
rm -rvf api

rm -rvf _site
rm -rvf _freeze
rm -rvf .jupyter_cache/
rm -rvf .virtual_documents/
rm -rvf __pycache__/
rm -rvf tutorials/.ipynb_checkpoints/
rm -rvf tutorials/.jupyter_cache/
rm -rvf tutorials/.virtual_documents/
rm -rvf user_guide/.ipynb_checkpoints/
rm -rvf user_guide/.jupyter_cache/
rm -rvf user_guide/.virtual_documents/
rm -vf objects.json

duration=$(( SECONDS - start ))
echo "Cleaned after $duration seconds."
