Makefile added with Version 2.4
This commit is contained in:
parent
c8031fd475
commit
add9a95f33
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"
|
||||||
|
|
||||||
|
2
patt
2
patt
@ -1 +1 @@
|
|||||||
Subproject commit d5ac8899cc3ab6a23f10a7b0f71b9643cf11f6f8
|
Subproject commit babead498da49de9d105d5b7a0478a68b746a443
|
2
piki
2
piki
@ -1 +1 @@
|
|||||||
Subproject commit 4102bea0a1e1065b31af214522c1b0e767ca6ae1
|
Subproject commit b95cd24eda26a7d4c4a91e6d7c00b4b068b72255
|
2
pygal
2
pygal
@ -1 +1 @@
|
|||||||
Subproject commit 6d8e626364793c02ef187af2f72d0c5196af0453
|
Subproject commit 1d74c20d3c6de954da0736192465f03e9557f27d
|
Loading…
x
Reference in New Issue
Block a user