From 86c52e35b68612b978e875bd7b12411556495473 Mon Sep 17 00:00:00 2001 From: JJJHolscher Date: Sun, 23 Jul 2023 17:34:22 +0200 Subject: [PATCH] makefile --- makefile | 20 ++++++++++++++++++++ main.py => src/main.py | 0 2 files changed, 20 insertions(+) create mode 100644 makefile rename main.py => src/main.py (100%) 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