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\\" invoker="\e[{${invoker:-}\e\\"
[ -z "${invoker}" ] || echo -e "Invoked from $invoker" [ -z "${invoker}" ] || echo -e "Invoked from $invoker"
# prepare submodules # prepare submodules
sed -i 's/git@git.sw3.cz:/https:\/\/git.sw3.cz\//g' .gitmodules #sed -i 's/git@git.sw3.cz:/https:\/\/git.sw3.cz\//g' .gitmodules
green "Preparing 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 [ ! -e "$submodule/.git" ] # if [ ! -e "$submodule/.git" ]
then # then
echo " -> module is unitialized..." # echo " -> module is unitialized..."
touch .uninitialized # touch .uninitialized
fi # fi
done #done
if [ -f .uninitialized ] #if [ -f .uninitialized ]
then #then
green "submodule init & sync" # green "submodule init & sync"
git submodule init # git submodule init
git submodule update # git submodule update
rm .uninitialized # rm .uninitialized
fi #fi
green "Submodule resume" green "Submodule resume"
git submodule git submodule