mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Update the man help file used in packaging (#5173)
* Update pacakging.psm1 and rename man file * Update pwsh.1.ronn
This commit is contained in:
committed by
Aditya Patwardhan
parent
e908b8a607
commit
2fd484f491
@@ -51,9 +51,6 @@ DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY
|
||||
# default location for produced nuget packages
|
||||
/nuget-artifacts
|
||||
|
||||
# generated man files
|
||||
/assets/powershell.1*
|
||||
|
||||
# resgen output
|
||||
gen
|
||||
|
||||
|
||||
@@ -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>]
|
||||
@@ -120,4 +120,4 @@ These are automatically defined PowerShell-language variables.
|
||||
## COPYRIGHT
|
||||
|
||||
Copyright (c) 2016 Microsoft Corporation.
|
||||
All rights reserved.
|
||||
All rights reserved.
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user