build:
	pyinstaller updatetime.spec

release:
	mkdir -p ./release/updatetime
	rm -rf ./release/updatetime/*
	pyinstaller updatetime.spec
	cp -f ./run.sh ./release/updatetime
	cp -f ./install.sh ./release/updatetime
	cp -r ./dist ./release/updatetime/bin
	cp -f ./updatetime.service ./release/updatetime

install:
	mkdir -p /usr/local/updatetime
	cp -r ./dist /usr/local/updatetime/bin
	cp -f ./run.sh /usr/local/updatetime
	cp updatetime.service  /usr/lib/systemd/system
	systemctl enable updatetime
	systemctl start updatetime

.PHONY:clean
clean:
	rm -rf build
	rm -rf dist