Update submodules when done
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
parent
2273937324
commit
420646e2d7
6
.laminar
6
.laminar
|
@ -1,3 +1,4 @@
|
|||
echo un: $uninitialized
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
@ -14,13 +15,14 @@ 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 [ ! -d "$submodule/.git" ]
|
||||
then
|
||||
echo "Moudle is unitialized..."
|
||||
echo " -> module is unitialized..."
|
||||
touch .uninitialized
|
||||
fi
|
||||
done
|
||||
|
@ -29,7 +31,7 @@ then
|
|||
then
|
||||
green "submodule init & sync"
|
||||
git submodule init
|
||||
git submodule sync
|
||||
git submodule update
|
||||
rm .uninitialized
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user