Submodule init when not done

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
Václav Valíček 2022-06-25 22:13:35 +02:00
parent da32755c15
commit 054d485761
Signed by: valicek
GPG Key ID: FF05BDCA0C73BB31

View File

@ -13,13 +13,27 @@ then
invoker="\e[{${invoker:-}\e\\"
[ -z "${invoker}" ] || echo -e "Invoked from $invoker"
unitialized=false
# prepare submodules
green "Preparing submodules..."
git submodule | awk '{print $2}' | while read submodule
do
echo "Submodule: $submodule"
if [ ! -d "$submodule/.git" ]
then
echo "Moudle is unitialized..."
unititialized=1
fi
done
if [ ! $uninitialized -eq 0 ]
then
green "submodule init & sync"
git submodule init
git submodule sync
fi
# name
nn=repo_checker_$PYTHON
nn=$(echo $nn | sed 's/\./_/g')