Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY
# default location for produced nuget packages
/nuget-artifacts

# generated man files
/assets/powershell.1*

# resgen output
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need /assets/pwsh.1* here?

Copy link
Member Author

@daxian-dbw daxian-dbw Oct 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it. New-UnixPackage command will clean up the generated pwsh.1.gz file in the end.

gen

Expand Down
6 changes: 3 additions & 3 deletions assets/powershell.1.ronn → assets/pwsh.1.ronn
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
powershell(1) -- command-line shell and .NET REPL
pwsh(1) -- PowerShell command-line shell and .NET REPL
=================================================

## SYNOPSIS

`powershell` [`-NoLogo`] [`-NoExit`] [`-NoProfile`] [`-NonInteractive`]
`pwsh` [`-NoLogo`] [`-NoExit`] [`-NoProfile`] [`-NonInteractive`]
[`-InputFormat` {Text | XML}] [`-OutputFormat` {Text | XML}]
[`-EncodedCommand` <Base64EncodedCommand>]
[`-File` <filePath> <args>] [`-ExecutionPolicy` <ExecutionPolicy>]
Expand Down Expand Up @@ -120,4 +120,4 @@ These are automatically defined PowerShell-language variables.
## COPYRIGHT

Copyright (c) 2016 Microsoft Corporation.
All rights reserved.
All rights reserved.
10 changes: 3 additions & 7 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -493,20 +493,16 @@ function New-UnixPackage {
}

# run ronn to convert man page to roff
$RonnFile = Join-Path $PSScriptRoot "/../../assets/powershell.1.ronn"
$RonnFile = Join-Path $PSScriptRoot "/../../assets/pwsh.1.ronn"
$RoffFile = $RonnFile -replace "\.ronn$"

# Run ronn on assets file
# Run does not play well with files named powershell6.0.1, so we generate and then rename
Start-NativeExecution { ronn --roff $RonnFile }

# Setup for side-by-side man pages (noop if primary package)
$FixedRoffFile = $RoffFile -replace "powershell.1$", "pwsh.1"
Move-Item $RoffFile $FixedRoffFile

# gzip in assets directory
$GzipFile = "$FixedRoffFile.gz"
Start-NativeExecution { gzip -f $FixedRoffFile }
$GzipFile = "$RoffFile.gz"
Start-NativeExecution { gzip -f $RoffFile }

$ManFile = Join-Path "/usr/local/share/man/man1" (Split-Path -Leaf $GzipFile)

Expand Down