Makefile added with Version 2.4
This commit is contained in:
parent
ed8d9291e4
commit
6b6f76d369
41
Makefile
41
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
|
default: help
|
||||||
|
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
@ -36,18 +36,52 @@ init: print_head
|
|||||||
echo -e "\033[1;33mInitialising git submodules...\e[0m"
|
echo -e "\033[1;33mInitialising git submodules...\e[0m"
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
# Init submodules
|
# Init submodules
|
||||||
SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort)
|
SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort)
|
||||||
for subdir in $$SUBDIRS; do
|
for subdir in $$SUBDIRS; do
|
||||||
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init
|
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init
|
||||||
done
|
done
|
||||||
if [[ $$SUBDIRS ]]; then
|
if [[ $$SUBDIRS = *[![:space:]]* ]]; then
|
||||||
$(MAKE) print_head
|
$(MAKE) print_head
|
||||||
fi
|
fi
|
||||||
# Create venv if needed
|
# Create venv if needed
|
||||||
if [[ -e $(VENV_FLAG) ]]; then
|
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
|
fi
|
||||||
# Start local init
|
# Start local init
|
||||||
echo -e "\033[1;33mDoing localinit...\e[0m"
|
echo -e "\033[1;33mDoing localinit...\e[0m"
|
||||||
@ -97,4 +131,3 @@ print_head:
|
|||||||
echo -ne "╚═"
|
echo -ne "╚═"
|
||||||
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
||||||
echo -e "═╝\033[00m"
|
echo -e "═╝\033[00m"
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e7bb5c27beb64863080e6a3b261d3674d394d436
|
Subproject commit b63c1952f15e46744d107899158f105077e40430
|
2
loggy
2
loggy
@ -1 +1 @@
|
|||||||
Subproject commit 7afcf0fd7a6b077f9fa1451fd995341597b572b2
|
Subproject commit 15e07aa871bfe4cfb2c9ee5620bcb6b12066f5b3
|
@ -1 +1 @@
|
|||||||
Subproject commit 6d1c856b25fa062bebb031d4dc9e2024d25fd938
|
Subproject commit 27531fa7dabc52dff76b7945ea49c1e00619c2b5
|
2
nemo
2
nemo
@ -1 +1 @@
|
|||||||
Subproject commit 67240de122377fcd214ff786491f379fbeeb5693
|
Subproject commit 01ed7bf0fd8163ce2f29de75cb8115908a4dd476
|
2
netst
2
netst
@ -1 +1 @@
|
|||||||
Subproject commit 6f9e228cb9aa346a9eedfda5962996bd9dd8ea1b
|
Subproject commit eeb655c0d95ef64fb371d0dd596b0049ec07ca9a
|
2
ptpython
2
ptpython
@ -1 +1 @@
|
|||||||
Subproject commit a6456d44095be04ca2a65202c4ea945effe3db4e
|
Subproject commit ba5b84abdb8521751fdeafe16176e56c620dd435
|
2
pyrip
2
pyrip
@ -1 +1 @@
|
|||||||
Subproject commit 95f4e1f08e58d1a1d53d9090351e390564fdc772
|
Subproject commit 5a53605e862cdc2063dbc8a8d96a21d50bc96461
|
2
starter
2
starter
@ -1 +1 @@
|
|||||||
Subproject commit 9729796125bc41237c0a7fa8515af04466de1ed0
|
Subproject commit f88d9448b5e9a74b273806bdad116a657b4b0eed
|
Loading…
x
Reference in New Issue
Block a user