diff --git a/Makefile b/Makefile index a2417f5..1503a9f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# git helper Makefile: Version 2.2 (2025-08-10) +# git helper Makefile: Version 2.5 (2025-08-11) default: help .ONESHELL: @@ -36,21 +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 - if [[ ! -e $(VENV_FOLDER) ]]; then - echo -e "\033[1;33mCreating virtual env...\e[0m" - 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 -L $$BASEPATH -name requirements.txt 2> /dev/null); 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" @@ -100,4 +131,3 @@ print_head: echo -ne "╚═" for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done echo -e "═╝\033[00m" - diff --git a/ambient_info b/ambient_info index 2021a0f..96c2514 160000 --- a/ambient_info +++ b/ambient_info @@ -1 +1 @@ -Subproject commit 2021a0f5bb2fba4d7349a0eba0c41b9880146df5 +Subproject commit 96c25144ba43c778ac8ffbfe7e4a653de68dffc6 diff --git a/bt-audio b/bt-audio index d8b8b7d..3064e04 160000 --- a/bt-audio +++ b/bt-audio @@ -1 +1 @@ -Subproject commit d8b8b7d9ff4b74c74204b224e6804bf0a36f08c1 +Subproject commit 3064e040aab20c09d9c1d6814b7120db4d7087c3 diff --git a/home_emulation b/home_emulation index 7053173..aefb1f2 160000 --- a/home_emulation +++ b/home_emulation @@ -1 +1 @@ -Subproject commit 7053173e871c4f3c057935aa6c0c540a0a6861ea +Subproject commit aefb1f287a33ca09031b92b1d3caf9158f35f4e7 diff --git a/leyk b/leyk index dfc9b86..9134e86 160000 --- a/leyk +++ b/leyk @@ -1 +1 @@ -Subproject commit dfc9b8687f5506127b0728098579c0da6cff1a88 +Subproject commit 9134e86028bbee37c2393d5073f38e58199ace2a diff --git a/mpd b/mpd index f85fbcf..cf0c77f 160000 --- a/mpd +++ b/mpd @@ -1 +1 @@ -Subproject commit f85fbcff40a247a343128b25e1f7494b8baadd14 +Subproject commit cf0c77f39e814359ba19e11f516e2c113a445053 diff --git a/powerplug-energenie b/powerplug-energenie index 6913de7..1ab6bfc 160000 --- a/powerplug-energenie +++ b/powerplug-energenie @@ -1 +1 @@ -Subproject commit 6913de74df5e082d98005823d24c39fea61d0e4f +Subproject commit 1ab6bfc4603c8a63c4ab75f876fc2399de0ec112 diff --git a/remote_control b/remote_control index 04b589a..e6ebde4 160000 --- a/remote_control +++ b/remote_control @@ -1 +1 @@ -Subproject commit 04b589ac9034b7f0606b6b3cec043ea3451a9b6f +Subproject commit e6ebde454b64fded7ceb463fa29994726ed19faa diff --git a/smart_brain b/smart_brain index 23a7f83..84d989a 160000 --- a/smart_brain +++ b/smart_brain @@ -1 +1 @@ -Subproject commit 23a7f8333d66a922561bc07d9b75ce7297ce35d9 +Subproject commit 84d989aa1fce81f88f4ffc2cdcc80d057f3d573b diff --git a/smart_brain_test b/smart_brain_test index d538cba..57353c1 160000 --- a/smart_brain_test +++ b/smart_brain_test @@ -1 +1 @@ -Subproject commit d538cba7e97a8da315b32f2e60f28eac3373b69b +Subproject commit 57353c18a135c14cadb2de280642aa79c5d84f17 diff --git a/spotify b/spotify index 1cae13a..132dd16 160000 --- a/spotify +++ b/spotify @@ -1 +1 @@ -Subproject commit 1cae13a47136d069954ac9255bd3e179d566ede9 +Subproject commit 132dd160617d56e7f5d59ef25ff371195e5d1502