diff --git a/makefile b/makefile new file mode 100644 index 0000000..27885e7 --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ + +pwd = $(shell pwd) +name = $(notdir $(pwd)) +symlink = ${HOME}/.local/bin/break-timer +venv = $(pwd)/.venv/bin/python + +$(symlink): $(venv) + echo "#!/bin/sh\n$(venv) $(pwd)/src/main.py \"\$$@\"" > $(symlink) + chmod +x $(symlink) + +$(venv): requirements.txt + python -m venv --prompt $(name) .venv + . .venv/bin/activate; \ + pip install --upgrade pip; \ + pip install -r requirements.txt + +clean: + rm -r .venv + rm $(symlink) + diff --git a/main.py b/src/main.py similarity index 100% rename from main.py rename to src/main.py