Salome HOME
projects
/
tools
/
sat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5714df
)
[FORUM 505] prepare command fix on windows
author
Nabil Ghodbane
<nabil.ghodbane@cea.fr>
Sat, 6 Apr 2024 12:26:06 +0000
(14:26 +0200)
committer
Nabil Ghodbane
<nabil.ghodbane@cea.fr>
Sat, 6 Apr 2024 12:26:06 +0000
(14:26 +0200)
src/system.py
patch
|
blob
|
history
diff --git
a/src/system.py
b/src/system.py
index cc500d0f5862ff3886a20e65309c9ef57687125a..7b8d1492bbbb3082f4c9b0eb04b5c7ef74401c0a 100644
(file)
--- a/
src/system.py
+++ b/
src/system.py
@@
-152,7
+152,7
@@
exit $res
# NOTICE: this command only works with recent version of git
# because --work-tree does not work with an absolute path
if src.architecture.is_windows():
# NOTICE: this command only works with recent version of git
# because --work-tree does not work with an absolute path
if src.architecture.is_windows():
- cmd = "rm
-rf
%(where)s && git clone %(git_options)s %(remote)s %(where)s && git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s"
+ cmd = "rm
dir /S /Q
%(where)s && git clone %(git_options)s %(remote)s %(where)s && git --git-dir=%(where_git)s --work-tree=%(where)s checkout %(tag)s"
else:
# for sat compile --update : changes the date of directory, only for branches, not tag
cmd = r"""
else:
# for sat compile --update : changes the date of directory, only for branches, not tag
cmd = r"""
@@
-244,13
+244,13
@@
rm -rf $tmpDir
cmd = r"""
set tmpDir=%(tmpWhere)s && \
cmd = r"""
set tmpDir=%(tmpWhere)s && \
-rm
-rf $tmpDir
-git clone %(git_options)s %(remote)s
$tmpDir
&& \
-cd
$tmpDir
&& \
+rm
dir /S /Q %tmpDir%
+git clone %(git_options)s %(remote)s
%tmpDir%
&& \
+cd
%tmpDir%
&& \
git checkout %(tag)s && \
mv %(sub_dir)s %(where)s && \
git checkout %(tag)s && \
mv %(sub_dir)s %(where)s && \
-git log -1 > %(where)s
/
README_git_log.txt && \
-rm
-rf $tmpDir
+git log -1 > %(where)s
\\
README_git_log.txt && \
+rm
dir /S /Q %tmpDir%
""" % aDict
DBG.write("cmd", cmd)
""" % aDict
DBG.write("cmd", cmd)