in hack/release/wizard/releaseWizard.py [0:0]
def display_cmd(self):
lines = []
pre = post = ''
if self.comment:
if is_windows():
lines.append("REM %s" % self.get_comment())
else:
lines.append("# %s" % self.get_comment())
if self.cwd:
lines.append("pushd %s" % self.cwd)
env = self.get_env()
if env is not None:
for k in env:
lines.append("%s=%s \\" % (k, env[k]))
redir = "" if self.redirect is None else " %s %s" % (">" if self.redirect_append is None else ">>" , self.get_redirect())
line = "%s%s" % (expand_multiline(self.get_cmd(), indent=2), redir)
# Print ~ or %HOME% rather than the full expanded homedir path
line = abbreviate_homedir(line)
lines.append(line)
if self.cwd:
lines.append("popd")
return lines