Don't reinit submodules

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
Václav Valíček 2022-08-09 20:56:49 +02:00
parent 14f7965431
commit 6118f5bf5d
Signed by: valicek
GPG Key ID: FF05BDCA0C73BB31

View File

@ -14,25 +14,25 @@ then
invoker="\e[{${invoker:-}\e\\"
[ -z "${invoker}" ] || echo -e "Invoked from $invoker"
# prepare submodules
sed -i 's/git@git.sw3.cz:/https:\/\/git.sw3.cz\//g' .gitmodules
green "Preparing submodules..."
git submodule | awk '{print $2}' | while read submodule
do
echo "Submodule: $submodule"
if [ ! -e "$submodule/.git" ]
then
echo " -> module is unitialized..."
touch .uninitialized
fi
done
#sed -i 's/git@git.sw3.cz:/https:\/\/git.sw3.cz\//g' .gitmodules
#green "Preparing submodules..."
#git submodule | awk '{print $2}' | while read submodule
#do
# echo "Submodule: $submodule"
# if [ ! -e "$submodule/.git" ]
# then
# echo " -> module is unitialized..."
# touch .uninitialized
# fi
#done
if [ -f .uninitialized ]
then
green "submodule init & sync"
git submodule init
git submodule update
rm .uninitialized
fi
#if [ -f .uninitialized ]
#then
# green "submodule init & sync"
# git submodule init
# git submodule update
# rm .uninitialized
#fi
green "Submodule resume"
git submodule