.PHONY: default commit clean

default: commit

commit: hosts
	@echo "Committing changes to the repository..."
	@git add hosts hosts.txt
	@git commit -m "Update hosts file"
	@git push origin main

hosts: hostlists/*.txt
	./generate.sh > $@
	cp $@ hosts.txt

clean:
	@rm -rf hosts hosts.txt