scripts: have _git_projects be more sane
This commit is contained in:
parent
957c736886
commit
caf6988aeb
|
@ -11,16 +11,11 @@ host="git.{{@@ mail.personal.mail @@}}"
|
||||||
user="$USER"
|
user="$USER"
|
||||||
host="github.com"
|
host="github.com"
|
||||||
#{%@@ endif @@%}#
|
#{%@@ endif @@%}#
|
||||||
|
git -C "$projdir" rev-parse >/dev/null &&
|
||||||
|
exit 0
|
||||||
|
|
||||||
if ! git -C "$projdir" rev-parse > /dev/null
|
git clone "ssh://git@${host}:${user}/projects" "$projdir"
|
||||||
then
|
|
||||||
git clone "ssh://git@${host}:${user}/projects" "$projdir"
|
|
||||||
|
|
||||||
cd "$projdir"
|
|
||||||
|
|
||||||
git submodule update --init --recursive
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$projdir"
|
cd "$projdir"
|
||||||
|
|
||||||
git submodule foreach --recursive sh -c 'git pull &'
|
git submodule update --init --recursive
|
||||||
|
|
Reference in New Issue