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

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