diff --git a/Makefile b/Makefile index a8851ac..9f48de2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# git helper Makefile: Version 2.3 (2025-08-10) +# git helper Makefile: Version 2.4 (2025-08-11) default: help .ONESHELL: @@ -36,18 +36,52 @@ init: print_head echo -e "\033[1;33mInitialising git submodules...\e[0m" git submodule init git submodule update + echo fi # Init submodules SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort) for subdir in $$SUBDIRS; do $(MAKE) --no-print-directory -C $$(dirname $$subdir) init done - if [[ $$SUBDIRS ]]; then + if [[ $$SUBDIRS = *[![:space:]]* ]]; then $(MAKE) print_head fi # Create venv if needed if [[ -e $(VENV_FLAG) ]]; then - mkvenv + BASEPATH=$$(pwd -P) + # + # Create venv + # + if [ ! -e venv ];then + echo -e "\033[1;33mCreating venv in $$BASEPATH...\e[0m" + python3 -m venv $$BASEPATH/venv > /dev/null 2>&1 + else + echo -e "\033[1;33mVirtualenv already exists in $$BASEPATH...\e[0m" + fi + echo + + # + # Install modules + # + echo -e "\033[1;33mInstalling modules to venv in $$BASEPATH...\e[0m" + for req_file in $$(find $$BASEPATH -name requirements.txt); do + # echo " $$req_file" + while read req_mod; do + if [[ $$req_mod = *[![:space:]]* ]]; then + # req_mod is not empty + OUT=$$($$BASEPATH/venv/bin/pip install -U $$req_mod 2>&1 ) + if [[ $$OUT =~ "Successfully installed" ]]; then + echo -e " * \033[1;32m$$req_mod installed.\e[0m" + elif [[ $$OUT =~ "already satisfied" ]]; then + echo -e " * \033[1;36m$$req_mod already installed.\e[0m" + else + echo -e " * \033[1;31m$$req_mod installation FAILED!\e[0m" + #echo $$OUT + fi + fi + done < $$req_file + done + echo fi # Start local init echo -e "\033[1;33mDoing localinit...\e[0m" @@ -97,4 +131,3 @@ print_head: echo -ne "╚═" for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done echo -e "═╝\033[00m" - diff --git a/caching b/caching index 726bb64..d1c1601 160000 --- a/caching +++ b/caching @@ -1 +1 @@ -Subproject commit 726bb64dd8a747774edabc73a38ec7dc35297445 +Subproject commit d1c16012991055a66db54274c93e46884e233fd0 diff --git a/fstools b/fstools index 146223f..8aca520 160000 --- a/fstools +++ b/fstools @@ -1 +1 @@ -Subproject commit 146223f37e2555d40cf762cec8fa05781f924029 +Subproject commit 8aca520d2acd1e3a04ebedbd4bdb7e20d2a78928 diff --git a/geo b/geo index baaee6d..069b486 160000 --- a/geo +++ b/geo @@ -1 +1 @@ -Subproject commit baaee6d8205c11b19773c60b5ac2f1d4554bec65 +Subproject commit 069b4863e65924b157e79e40c6749948d8a2f2ab diff --git a/helpers b/helpers index d7684e9..b70a22f 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit d7684e97c845ac7548a8f21b660f4a5dfc92d192 +Subproject commit b70a22f6647b1f7537388ac48778b3d21d3764b7 diff --git a/keyboard b/keyboard index 6819bbe..3ad1e40 160000 --- a/keyboard +++ b/keyboard @@ -1 +1 @@ -Subproject commit 6819bbeec05c09d2783c51a2afed1f1185f0b2c2 +Subproject commit 3ad1e406c817f86a62960edc4268f0ee7ddc9459 diff --git a/media b/media index 3506086..92e360b 160000 --- a/media +++ b/media @@ -1 +1 @@ -Subproject commit 35060860bab27dda0630909a453c6b96b6dfd357 +Subproject commit 92e360bc825ff7d0307640970d77a17b3921ef1b diff --git a/mqtt b/mqtt index d9ca4c3..aacc600 160000 --- a/mqtt +++ b/mqtt @@ -1 +1 @@ -Subproject commit d9ca4c3aeef181035208b2684963641b614a384e +Subproject commit aacc6009ddf410a34b341bdac3720bf61a7187fa diff --git a/report b/report index 1b804f2..dce956f 160000 --- a/report +++ b/report @@ -1 +1 @@ -Subproject commit 1b804f20a77ba32cb5c00866fb4238e88a7854ae +Subproject commit dce956f626dea635e537685c052e8206e82bed33 diff --git a/socket_protocol b/socket_protocol index a6dcbf4..897947c 160000 --- a/socket_protocol +++ b/socket_protocol @@ -1 +1 @@ -Subproject commit a6dcbf4eb3a0978ae155d272371c21b092ea8588 +Subproject commit 897947c94aff675bf0634d851fbb0e76df0387e9 diff --git a/state_machine b/state_machine index b45fc39..e0834ae 160000 --- a/state_machine +++ b/state_machine @@ -1 +1 @@ -Subproject commit b45fc398c0a341870549368386d324b632f38a53 +Subproject commit e0834ae5064fa80ac380e04a4abe5f8638139a95 diff --git a/stringtools b/stringtools index b853142..e7921fc 160000 --- a/stringtools +++ b/stringtools @@ -1 +1 @@ -Subproject commit b8531426053cc8bc0abeba4938750470865c9b7f +Subproject commit e7921fc87a972f749f891c7fc33ef53f33274f4e diff --git a/task b/task index 1935bb0..d911da4 160000 --- a/task +++ b/task @@ -1 +1 @@ -Subproject commit 1935bb03ce9e65595156ba176124db87d18a9106 +Subproject commit d911da44a34d2dd7b328b34f9f313a21d065157b diff --git a/tcp_socket b/tcp_socket index 314bf7c..6b3f5f7 160000 --- a/tcp_socket +++ b/tcp_socket @@ -1 +1 @@ -Subproject commit 314bf7cdbfe4e7fad84f8e93c694fe42b8fdafc3 +Subproject commit 6b3f5f761c6540f937c06d1398fa3d05359f9171