scripts: have _git_projects be more sane

This commit is contained in:
lelgenio 2021-06-16 03:41:44 -03:00
parent 957c736886
commit caf6988aeb
1 changed files with 4 additions and 9 deletions

View File

@ -11,16 +11,11 @@ host="git.{{@@ mail.personal.mail @@}}"
user="$USER"
host="github.com"
#{%@@ endif @@%}#
git -C "$projdir" rev-parse >/dev/null &&
exit 0
if ! git -C "$projdir" rev-parse > /dev/null
then
git clone "ssh://git@${host}:${user}/projects" "$projdir"
cd "$projdir"
git submodule update --init --recursive
fi
git clone "ssh://git@${host}:${user}/projects" "$projdir"
cd "$projdir"
git submodule foreach --recursive sh -c 'git pull &'
git submodule update --init --recursive