download-webdriver:
	curl -L https://storage.googleapis.com/chrome-for-testing-public/132.0.6834.110/linux64/chrome-linux64.zip -o chrome-linux64.zip
	curl -L https://storage.googleapis.com/chrome-for-testing-public/132.0.6834.110/linux64/chromedriver-linux64.zip -o chromedriver-linux64.zip

prepare-webdriver: download-webdriver
	mkdir -p run/webdriver/chrome
	unzip chrome-linux64.zip -d run/webdriver/chrome
	rm -f chrome-linux64.zip

	mkdir -p run/webdriver/chromedriver
	unzip -j chromedriver-linux64.zip -d run/webdriver/chromedriver
	rm -f chromedriver-linux64.zip

setup: prepare-webdriver
	python3 -m venv venv
	pip install -e .

clean-webdriver:
	rm -rf run/webdriver

clean: clean-webdriver
	rm -rf run
	rm -rf venv

all: setup