X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fsystem.py;h=c54452b4343efdadb1742d26ce59687418b4785d;hb=7366f56ee2827c206d480bae8d40c25eb292b89a;hp=b7cc6c2a483caf3193b9310fd85ed02461913995;hpb=c146ba1d71d83455b105a4756450d1c6473d4822;p=tools%2Fsat.git diff --git a/src/system.py b/src/system.py index b7cc6c2..c54452b 100644 --- a/src/system.py +++ b/src/system.py @@ -98,7 +98,9 @@ def git_extract(from_what, tag, git_options, where, logger, environment=None): cmd = r""" set -x git clone %(git_options)s %(remote)s %(where)s -touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s +res=$? +if [ $res -eq 0 ]; then touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s;fi +exit $res """ cmd = cmd % {'git_options': git_options, 'remote': from_what, 'tag': tag, 'where': str(where), 'where_git': where_git} else: @@ -115,7 +117,7 @@ git clone %(git_options)s %(remote)s %(where)s && \ git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s res=$? git --git-dir=%(where_git)s status|grep HEAD -if [ $? -ne 0 ]; then touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s;fi +if [ $res -eq 0 -a $? -ne 0 ]; then touch -d "$(git --git-dir=%(where_git)s log -1 --format=date_format)" %(where)s;fi exit $res """ cmd = cmd % {'git_options': git_options,