mirror of
https://github.com/wavetermdev/chocolatey.git
synced 2026-08-05 13:47:23 -07:00
updated with better package examples
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Updates nuspec file description from README.md
|
||||
|
||||
.DESCRIPTION
|
||||
This script should be called in au_AfterUpdate to put the text in the README.md
|
||||
into description tag of the Nuspec file. The current description will be replaced.
|
||||
Function will throw an error if README.md is not found.
|
||||
|
||||
.PARAMETER SkipFirst
|
||||
Number of start lines to skip from the README.md, by default 0.
|
||||
|
||||
|
||||
.PARAMETER SkipLast
|
||||
Number of end lines to skip from the README.md, by default 0.
|
||||
|
||||
.EXAMPLE
|
||||
function global:au_AfterUpdate { Set-DescriptionFromReadme -SkipFirst 2 }
|
||||
#>
|
||||
function Set-DescriptionFromReadme([int]$SkipFirst=0, [int]$SkipLast=0) {
|
||||
if (!(Test-Path README.md)) { throw 'Set-DescriptionFromReadme: README.md not found' }
|
||||
|
||||
Write-Host 'Setting README.md to Nuspec description tag'
|
||||
$description = gc README.md -Encoding UTF8
|
||||
$endIdx = $description.Length - $SkipLast
|
||||
$description = $description | select -Index ($SkipFirst..$endIdx) | Out-String
|
||||
|
||||
$nuspecFileName = $Latest.PackageName + ".nuspec"
|
||||
$nu = gc $nuspecFileName -Raw
|
||||
$nu = $nu -replace "(?smi)(\<description\>).*?(\</description\>)", "`${1}$($description)`$2"
|
||||
|
||||
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False)
|
||||
$NuPath = (Resolve-Path $NuspecFileName)
|
||||
[System.IO.File]::WriteAllText($NuPath, $nu, $Utf8NoBomEncoding)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
ls $PSScriptRoot\*.ps1 -Exclude all.ps1 | % { . $_ }
|
||||
@@ -0,0 +1,33 @@
|
||||
# <img src="https://cdn.rawgit.com/majkinetor/chocolatey/master/copyq/icon.png" width="48" height="48"/> [CopyQ](https://chocolatey.org/packages/copyq)
|
||||
|
||||
CopyQ monitors system clipboard and saves its content in customized tabs. Saved clipboard can be later copied and pasted directly into any application.
|
||||
|
||||
Items can be:
|
||||
|
||||
* edited with internal editor or with preferred text editor,
|
||||
* moved to other tabs,
|
||||
* drag'n'dropped to applications,
|
||||
* marked with tag or a note,
|
||||
* passed to or changed by custom commands, or simply removed.
|
||||
|
||||
## Features
|
||||
|
||||
* Support for Linux, Windows and OS X 10.9+
|
||||
* Store text, HTML, images or any other custom formats
|
||||
* Quickly browse and filter items in clipboard history
|
||||
* Sort, create, edit, remove, copy/paste, drag'n'drop items in tabs
|
||||
* Add notes or tags to items
|
||||
* System-wide shortcuts with customizable commands
|
||||
* Paste items with shortcut or from tray or main window
|
||||
* Fully customizable appearance
|
||||
* Advanced command-line interface and scripting
|
||||
* Ignore clipboard copied from some windows or containing some text
|
||||
* Support for simple Vim-like editor and shortcuts
|
||||
* Many more features
|
||||
|
||||
## Package parameters
|
||||
|
||||
* `NoDesktopIcon` - do not create desktop icon
|
||||
* `NoStartup` - do not run CopyQ on OS startup
|
||||
|
||||

|
||||
+10
-10
@@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
|
||||
<id>copyq</id>
|
||||
<title>CopyQ</title>
|
||||
<version>2.7.1.20160708</version>
|
||||
<version>2.9.0</version>
|
||||
<authors>Lukas Holocek</authors>
|
||||
<owners>Miodrag Milić</owners>
|
||||
<owners>Miodrag Milic</owners>
|
||||
<summary>Cross-platform clipboard manager with advanced features</summary>
|
||||
<description>
|
||||
CopyQ monitors system clipboard and saves its content in customized tabs. Saved clipboard can be later copied and pasted directly into any application.
|
||||
<description>CopyQ monitors system clipboard and saves its content in customized tabs. Saved clipboard can be later copied and pasted directly into any application.
|
||||
|
||||
Items can be:
|
||||
|
||||
@@ -20,8 +19,7 @@ Items can be:
|
||||
* marked with tag or a note,
|
||||
* passed to or changed by custom commands, or simply removed.
|
||||
|
||||
Features
|
||||
--------
|
||||
## Features
|
||||
|
||||
* Support for Linux, Windows and OS X 10.9+
|
||||
* Store text, HTML, images or any other custom formats
|
||||
@@ -37,17 +35,18 @@ Features
|
||||
* Many more features
|
||||
|
||||

|
||||
|
||||
</description>
|
||||
<projectUrl>https://hluk.github.io/CopyQ</projectUrl>
|
||||
<tags>admin clipboard copyq</tags>
|
||||
<tags>admin clipboard copyq cross-platform foss</tags>
|
||||
<copyright></copyright>
|
||||
<licenseUrl>https://github.com/hluk/CopyQ/blob/master/LICENSE</licenseUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<iconUrl>https://cdn.rawgit.com/majkinetor/chocolatey/master/copyq/icon.png</iconUrl>
|
||||
<dependencies>
|
||||
<dependency id="mm-choco.extension" version="0.0.3" />
|
||||
<dependency id="chocolatey-core.extension" version="1.2" />
|
||||
</dependencies>
|
||||
<releaseNotes></releaseNotes>
|
||||
<releaseNotes>https://github.com/hluk/CopyQ/releases/tag/v2.9.0</releaseNotes>
|
||||
<docsUrl>https://github.com/hluk/CopyQ/wiki</docsUrl>
|
||||
<bugTrackerUrl>https://github.com/hluk/CopyQ/issues</bugTrackerUrl>
|
||||
<projectSourceUrl>https://github.com/hluk/CopyQ</projectSourceUrl>
|
||||
@@ -55,5 +54,6 @@ Features
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
<file src="legal\**" target="legal" />
|
||||
</files>
|
||||
</package>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
VERIFICATION
|
||||
|
||||
Verification is intended to assist the Chocolatey moderators and community
|
||||
in verifying that this package's contents are trustworthy.
|
||||
|
||||
Package can be verified like this:
|
||||
|
||||
1. Go to
|
||||
|
||||
x32: https://github.com/hluk/CopyQ/releases/download/v2.9.0/copyq-v2.9.0-setup.exe
|
||||
|
||||
to download the installer.
|
||||
|
||||
2. You can use one of the following methods to obtain the SHA256 checksum:
|
||||
- Use powershell function 'Get-FileHash'
|
||||
- Use Chocolatey utility 'checksum.exe'
|
||||
|
||||
checksum32:
|
||||
|
||||
Using AU:
|
||||
|
||||
Get-RemoteChecksum https://github.com/hluk/CopyQ/releases/download/v2.9.0/copyq-v2.9.0-setup.exe
|
||||
|
||||
File 'license.txt' is obtained from:
|
||||
https://raw.githubusercontent.com/hluk/CopyQ/master/LICENSE
|
||||
@@ -1,27 +1,33 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$packageName = 'copyq'
|
||||
$url32 = 'https://github.com/hluk/CopyQ/releases/download/v2.7.1/copyq-2.7.1-setup.exe'
|
||||
$checksum32 = '781787EF7DB6801A843DED62900380CCCF31A0E9917FA13A55B19932A8F35DAC'
|
||||
$running = if (ps $packageName -ea 0) { $true } else { $false }
|
||||
|
||||
$fileType = 'exe'
|
||||
$toolsDir = Split-Path $MyInvocation.MyCommand.Definition
|
||||
$embedded_path = gi "$toolsDir\*.$fileType"
|
||||
|
||||
$pp = Get-PackageParameters
|
||||
$tasks=@()
|
||||
if (!$pp.NoStartup) { Write-Host 'Automatically start with Windows'; $tasks += 'startup'}
|
||||
if (!$pp.NoDesktopIcon) { Write-Host 'Create desktop icon'; $tasks += 'desktopicon' }
|
||||
|
||||
$packageArgs = @{
|
||||
packageName = $packageName
|
||||
fileType = 'EXE'
|
||||
url = $url32
|
||||
checksum = $checksum32
|
||||
checksumType = 'sha256'
|
||||
silentArgs = '/VERYSILENT'
|
||||
validExitCodes = @(0)
|
||||
registryUninstallerKey = $packageName
|
||||
packageName = $packageName
|
||||
fileType = $fileType
|
||||
file = $embedded_path
|
||||
silentArgs = '/VERYSILENT /TASKS=' + ($tasks -join ',')
|
||||
validExitCodes = @(0)
|
||||
softwareName = $packageName
|
||||
}
|
||||
Install-ChocolateyPackage @packageArgs
|
||||
Install-ChocolateyInstallPackage @packageArgs
|
||||
rm $embedded_path -ea 0
|
||||
|
||||
$installLocation = Get-AppInstallLocation $packageArgs.registryUninstallerKey
|
||||
if ($installLocation) { Write-Host "$packageName installed to '$installLocation'" }
|
||||
else { Write-Warning "Can't find $PackageName install location" }
|
||||
$packageName = $packageArgs.packageName
|
||||
$installLocation = Get-AppInstallLocation $packageName
|
||||
if (!$installLocation) { Write-Warning "Can't find $packageName install location"; return }
|
||||
Write-Host "$packageName installed to '$installLocation'"
|
||||
|
||||
if ($installLocation -and $running) {
|
||||
Write-Host "CopyQ was running before update, starting it up again"
|
||||
start "$installLocation\copyq.exe"
|
||||
}
|
||||
Register-Application "$installLocation\$packageName.exe"
|
||||
Write-Host "$packageName registered as $packageName"
|
||||
|
||||
start "$installLocation\$packageName.exe"
|
||||
|
||||
+24
-6
@@ -1,16 +1,30 @@
|
||||
import-module au
|
||||
. $PSScriptRoot\..\_scripts\all.ps1
|
||||
|
||||
$releases = 'https://github.com/hluk/CopyQ/releases'
|
||||
$releases = 'https://github.com/hluk/CopyQ/releases'
|
||||
|
||||
function global:au_SearchReplace {
|
||||
@{
|
||||
@{
|
||||
".\tools\chocolateyInstall.ps1" = @{
|
||||
"(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
|
||||
"(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
|
||||
"(?i)(^\s*[$]packageName\s*=\s*)('.*')"= "`$1'$($Latest.PackageName)'"
|
||||
"(?i)(^\s*[$]fileType\s*=\s*)('.*')" = "`$1'$($Latest.FileType)'"
|
||||
}
|
||||
|
||||
"$($Latest.PackageName).nuspec" = @{
|
||||
"(\<releaseNotes\>).*?(\</releaseNotes\>)" = "`${1}$($Latest.ReleaseNotes)`$2"
|
||||
}
|
||||
|
||||
".\legal\VERIFICATION.txt" = @{
|
||||
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
|
||||
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
|
||||
"(?i)(Get-RemoteChecksum).*" = "`${1} $($Latest.URL32)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function global:au_BeforeUpdate { Get-RemoteFiles -Purge }
|
||||
function global:au_AfterUpdate { Set-DescriptionFromReadme -SkipFirst 2 }
|
||||
|
||||
function global:au_GetLatest {
|
||||
$download_page = Invoke-WebRequest -Uri $releases
|
||||
|
||||
@@ -20,7 +34,11 @@ function global:au_GetLatest {
|
||||
|
||||
$version = $url -split '-|.exe' | select -Last 1 -Skip 2
|
||||
|
||||
return @{ URL32 = $url; Version = $version }
|
||||
return @{
|
||||
URL32 = $url
|
||||
Version = $version.Replace('v','')
|
||||
ReleaseNotes = "$releases/tag/${version}"
|
||||
}
|
||||
}
|
||||
|
||||
update -ChecksumFor 32
|
||||
update -ChecksumFor none
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
|
||||
<id>html-tidy</id>
|
||||
<title>HTML Tidy with HTML5 support</title>
|
||||
<version>5.2.0.20160708</version>
|
||||
<authors>HTACG</authors>
|
||||
<owners>Miodrag Milić</owners>
|
||||
<summary>Tidy is a console application for Mac OS X, Linux, Windows, UNIX, and more. It corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards</summary>
|
||||
<description>
|
||||
Tidy is a console application for Mac OS X, Linux, Windows, UNIX, and more. It corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards.
|
||||
</description>
|
||||
<projectUrl>http://www.html-tidy.org/</projectUrl>
|
||||
<tags>x-platform xml html tidy html5</tags>
|
||||
<copyright>HTACG</copyright>
|
||||
<licenseUrl>https://github.com/htacg/tidy-html5/blob/master/README/LICENSE.md</licenseUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<!--<dependencies>
|
||||
<dependency id="" version="" />
|
||||
</dependencies>-->
|
||||
<releaseNotes></releaseNotes>
|
||||
<docsUrl>http://www.html-tidy.org/documentation</docsUrl>
|
||||
<bugTrackerUrl>https://github.com/htacg/tidy-html5/issues</bugTrackerUrl>
|
||||
<projectSourceUrl>https://github.com/htacg/tidy-html5</projectSourceUrl>
|
||||
<packageSourceUrl>https://github.com/majkinetor/chocolatey/tree/master/html-tidy</packageSourceUrl>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
</files>
|
||||
</package>
|
||||
@@ -1,19 +0,0 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$packageName = 'html-tidy'
|
||||
$url32 = 'https://github.com/htacg/tidy-html5/releases/download/5.2.0/tidy-5.2.0-win32.zip'
|
||||
$url64 = 'https://github.com/htacg/tidy-html5/releases/download/5.2.0/tidy-5.2.0-win64.zip'
|
||||
$checksum32 = '94D653498B4F93B14F12A55CA06154E19C540C9B276E5D163F1CF84FA078F97A'
|
||||
$checksum64 = 'DD9FD814CC44BC2FFA9B9E547B1A6CBB42B6BE7B9358542D3EE7F6E10B676423'
|
||||
|
||||
$packageArgs = @{
|
||||
packageName = $packageName
|
||||
url = $url32
|
||||
url64Bit = $url64
|
||||
checksum = $checksum32
|
||||
checksum64 = $checksum64
|
||||
checksumType = 'sha256'
|
||||
checksumType64 = 'sha256'
|
||||
unzipLocation = Split-Path $MyInvocation.MyCommand.Definition
|
||||
}
|
||||
Install-ChocolateyZipPackage @packageArgs
|
||||
@@ -1,31 +0,0 @@
|
||||
import-module au
|
||||
|
||||
$releases = 'https://github.com/htacg/tidy-html5/releases'
|
||||
|
||||
function global:au_SearchReplace {
|
||||
@{
|
||||
'tools\chocolateyInstall.ps1' = @{
|
||||
"(^[$]url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'"
|
||||
"(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
|
||||
"(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
|
||||
"(^[$]checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function global:au_GetLatest {
|
||||
$download_page = Invoke-WebRequest -Uri $releases
|
||||
|
||||
#tidy-5.1.25-win64.zip
|
||||
$re = "tidy-.+-win(32|64).zip"
|
||||
$url = $download_page.links | ? href -match $re | select -First 2 -expand href
|
||||
|
||||
$version = $url[0] -split '-' | select -Last 1 -Skip 1
|
||||
$url32 = 'https://github.com' + $url[0]
|
||||
$url64 = 'https://github.com' + $url[1]
|
||||
|
||||
$Latest = @{ URL32 = $url32; URL64 = $url64; Version = $version }
|
||||
return $Latest
|
||||
}
|
||||
|
||||
update
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>less</id>
|
||||
<version>4.81.1.20160913</version>
|
||||
<version>4.87</version>
|
||||
<title>Less for Windows</title>
|
||||
<authors>Mark Nudelman</authors>
|
||||
<owners>Miodrag Milić</owners>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
VERIFICATION
|
||||
|
||||
Verification is intended to assist the Chocolatey moderators and community
|
||||
in verifying that this package's contents are trustworthy.
|
||||
|
||||
Package can be verified like this:
|
||||
|
||||
1. Go to
|
||||
|
||||
x32: http://guysalias.tk/misc/less/less-487-win32-static-x86.7z.7z
|
||||
|
||||
to download the zip package.
|
||||
|
||||
2. You can use one of the following methods to obtain the checksum:
|
||||
- Use powershell function 'Get-FileHash'
|
||||
- Use Chocolatey utility 'checksum.exe'
|
||||
|
||||
checksum32:
|
||||
@@ -1,6 +0,0 @@
|
||||
MD5(less.exe)= d1c06d128de75a28ac3b4e195df12a85
|
||||
SHA1(less.exe)= a4d7da5ddc97150725f3f85e19f2515f6b209d20
|
||||
SHA256(less.exe)= f25459a58f03cd36fb2f8499e78c054a50265c7e6529428891395a52d2d43b9c
|
||||
MD5(lesskey.exe)= e2545a509c52450c3c5734adf0c9c80a
|
||||
SHA1(lesskey.exe)= 631c05477ab7b8fc619f7542638d0356fa081ee7
|
||||
SHA256(lesskey.exe)= 382fa8941dfe180311e829035ccfd64a6e079739c677684bb96b3bbbfc869b0a
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
Less License
|
||||
------------
|
||||
|
||||
Less
|
||||
Copyright (C) 1984-2015 Mark Nudelman
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice in the documentation and/or other materials provided with
|
||||
the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-902
File diff suppressed because it is too large
Load Diff
@@ -1,238 +0,0 @@
|
||||
|
||||
Less, version 481
|
||||
|
||||
This is the distribution of less, version 481, released 31 Aug 2015.
|
||||
This program is part of the GNU project (http://www.gnu.org).
|
||||
|
||||
This program is free software. You may redistribute it and/or
|
||||
modify it under the terms of either:
|
||||
|
||||
1. The GNU General Public License, as published by the Free
|
||||
Software Foundation; either version 3, or (at your option) any
|
||||
later version. A copy of this license is in the file COPYING.
|
||||
or
|
||||
2. The Less License, in the file LICENSE.
|
||||
|
||||
Please report any problems to bug-less@gnu.org.
|
||||
See http://www.greenwoodsoftware.com/less for the latest info.
|
||||
|
||||
=========================================================================
|
||||
|
||||
This is the distribution of "less", a paginator similar to "more" or "pg".
|
||||
|
||||
The formatted manual page is in less.man.
|
||||
The manual page nroff source is in less.nro.
|
||||
Major changes made since the last posted version are in NEWS.
|
||||
|
||||
=======================================================================
|
||||
INSTALLATION (Unix systems only):
|
||||
|
||||
1. Move the distributed source to its own directory and unpack it,
|
||||
if you have not already done so.
|
||||
|
||||
2. Type "sh configure".
|
||||
This will generate a Makefile and a defines.h.
|
||||
Warning: if you have a GNU sed, make sure it is version 2.05 or later.
|
||||
|
||||
The file INSTALL describes the usage of the configure program in
|
||||
general. In addition, these options to configure are supported:
|
||||
|
||||
--with-editor=program
|
||||
Specifies the default editor program used by the "v" command.
|
||||
The default is "vi".
|
||||
|
||||
--with-regex=lib
|
||||
Specifies the regular expression library used by less for pattern
|
||||
matching. The default is "auto", which means the configure program
|
||||
finds a regular expression library automatically. Other values are:
|
||||
gnu Use the GNU regex library.
|
||||
pcre Use the PCRE library.
|
||||
posix Use the POSIX-compatible regcomp.
|
||||
regcmp Use the regcmp library.
|
||||
re_comp Use the re_comp library.
|
||||
regcomp Use the V8-compatible regcomp.
|
||||
regcomp-local Use Henry Spencer's V8-compatible regcomp
|
||||
(source is supplied with less).
|
||||
none No regular expressions, only simple string matching.
|
||||
--with-secure
|
||||
Builds a "secure" version of less, with some features disabled
|
||||
to prevent users from viewing other files, accessing shell
|
||||
commands, etc.
|
||||
|
||||
|
||||
3. It is a good idea to look over the generated Makefile and defines.h
|
||||
and make sure they look ok. If you know of any peculiarities of
|
||||
your system that configure might not have detected, you may fix the
|
||||
Makefile now. Take particular notice of the list of "terminal"
|
||||
libraries in the LIBS definition in the Makefile; these may need
|
||||
to be edited. The terminal libraries will be some subset of
|
||||
-lncurses -lcurses -ltermcap -ltermlib
|
||||
|
||||
If you wish, you may edit defines.h to remove some optional features.
|
||||
If you choose not to include some features in your version, you may
|
||||
wish to edit the manual page "less.nro" and the help page "less.hlp"
|
||||
to remove the descriptions of the features which you are removing.
|
||||
If you edit less.hlp, you should run "make -f Makefile.aut help.c".
|
||||
|
||||
4. Type "make" and watch the fun.
|
||||
|
||||
5. If the make succeeds, it will generate the programs "less",
|
||||
"lesskey" and "lessecho" in your current directory. Test the
|
||||
generated programs.
|
||||
|
||||
6. When satisfied that it works, if you wish to install it
|
||||
in a public place, type "make install".
|
||||
|
||||
The default install destinations are:
|
||||
Executables (less, lesskey, lessecho) in /usr/local/bin
|
||||
Documentation (less.nro, lesskey.nro) in /usr/local/man/man1
|
||||
If you want to install any of these files elsewhere, define
|
||||
bindir and/or mandir to the appropriate directories.
|
||||
|
||||
If you have any problems building or running "less", suggestions,
|
||||
complaints, etc., you may mail to bug-less@gnu.org.
|
||||
|
||||
Note to hackers: comments noting possible improvements are enclosed
|
||||
in double curly brackets {{ like this }}.
|
||||
|
||||
(Note that the above note was originally written at a time when
|
||||
"hackers" most commonly meant "enthusiastic and dedicated computer
|
||||
programmers", not "persons who attempt to circumvent computer security".)
|
||||
|
||||
|
||||
|
||||
=======================================================================
|
||||
INSTALLATION (MS-DOS systems only,
|
||||
with Microsoft C, Borland C, or DJGPP)
|
||||
|
||||
1. Move the distributed source to its own directory.
|
||||
Depending on your compiler, you may need to convert the source
|
||||
to have CR-LF rather than LF as line terminators.
|
||||
|
||||
2. If you are using Microsoft C, rename MAKEFILE.DSU to MAKEFILE.
|
||||
If you are using Borland C, rename MAKEFILE.DSB to MAKEFILE.
|
||||
If you are using DJGPP, rename MAKEFILE.DSG to MAKEFILE.
|
||||
|
||||
3. Look at MAKEFILE to make sure that the definitions for CC and LIBDIR
|
||||
are correct. CC should be the name of your C compiler and
|
||||
LIBDIR should be the directory where the C libraries reside (for
|
||||
Microsoft C only). If these definitions need to be changed, you can
|
||||
either modify the definitions directly in MAKEFILE, or set your
|
||||
environment variables CC and/or LIBDIR to override the definitions
|
||||
in MAKEFILE.
|
||||
|
||||
4. If you wish, you may edit DEFINES.DS to remove some optional features.
|
||||
If you choose not to include some features in your version, you may
|
||||
wish to edit the manual page LESS.MAN and the help page HELP.C
|
||||
to remove the descriptions of the features which you are removing.
|
||||
|
||||
5. Run your "make" program and watch the fun.
|
||||
If your "make" requires a flag to import environment variables,
|
||||
you should use that flag.
|
||||
If your compiler runs out of memory, try running "make -n >cmds.bat"
|
||||
and then run cmds.bat.
|
||||
|
||||
6. If the make succeeds, it will generate the programs "LESS.EXE" and
|
||||
"LESSKEY.EXE" in your current directory. Test the generated programs.
|
||||
|
||||
7. When satisfied that it works, you may wish to install LESS.EXE and
|
||||
LESSKEY.EXE in a directory which is included in your PATH.
|
||||
|
||||
|
||||
|
||||
=======================================================================
|
||||
INSTALLATION (Windows-95, Windows-98 and Windows-NT systems only,
|
||||
with Borland C or Microsoft Visual C++)
|
||||
|
||||
1. Move the distributed source to its own directory.
|
||||
|
||||
2. If you are using Borland C, rename Makefile.wnb to Makefile.
|
||||
If you are using Microsoft Visual C++, rename Makefile.wnm to Makefile.
|
||||
|
||||
3. Check the Makefile to make sure the definitions look ok.
|
||||
|
||||
4. If you wish, you may edit defines.wn to remove some optional features.
|
||||
If you choose not to include some features in your version, you may
|
||||
wish to edit the manual page less.man and the help page help.c
|
||||
to remove the descriptions of the features which you are removing.
|
||||
|
||||
5. Type "make" and watch the fun.
|
||||
|
||||
6. If the make succeeds, it will generate the programs "less.exe" and
|
||||
"lesskey.exe" in your current directory. Test the generated programs.
|
||||
|
||||
7. When satisfied that it works, if you wish to install it
|
||||
in a public place, type "make install".
|
||||
See step 6 of the Unix installation instructions for details
|
||||
on how to change the default installation directories.
|
||||
|
||||
|
||||
|
||||
=======================================================================
|
||||
INSTALLATION (OS/2 systems only,
|
||||
with EMX C)
|
||||
|
||||
1. Move the distributed source to its own directory.
|
||||
|
||||
2. Rename Makefile.o2e to Makefile.
|
||||
|
||||
3. Check the Makefile to make sure the definitions look ok.
|
||||
|
||||
4. If you wish, you may edit defines.o2 to remove some optional features.
|
||||
If you choose not to include some features in your version, you may
|
||||
wish to edit the manual page less.man and the help page help.c
|
||||
to remove the descriptions of the features which you are removing.
|
||||
|
||||
5. Type "make" and watch the fun.
|
||||
|
||||
6. If the make succeeds, it will generate the programs "less.exe" and
|
||||
"lesskey.exe" in your current directory. Test the generated programs.
|
||||
|
||||
7. Make sure you have the emx runtime installed. You need the emx DLLs
|
||||
emx.dll and emxlibcs.dll and also the termcap database, termcap.dat.
|
||||
Make sure you have termcap.dat either in the default location or
|
||||
somewhere in a directory listed in the PATH or INIT environment
|
||||
variables.
|
||||
|
||||
8. When satisfied that it works, you may wish to install less.exe,
|
||||
lesskey.exe and scrsize.exe in a directory which is included in
|
||||
your PATH. scrsize.exe is required only if you use a terminal
|
||||
emulator such as xterm or rxvt.
|
||||
|
||||
|
||||
|
||||
=======================================================================
|
||||
INSTALLATION (OS-9 systems only,
|
||||
with Microware C or Ultra C)
|
||||
|
||||
1. Move the distributed source to its own directory.
|
||||
|
||||
2. If you are using Microware C, rename Makefile.o9c to Makefile.
|
||||
If you are using Ultra C, rename Makefile.o9u to Makefile.
|
||||
|
||||
3. Check the Makefile to make sure the definitions look ok.
|
||||
|
||||
4. If you wish, you may edit defines.o9 to remove some optional features.
|
||||
If you choose not to include some features in your version, you may
|
||||
wish to edit the manual page less.man and the help page help.c
|
||||
to remove the descriptions of the features which you are removing.
|
||||
|
||||
5. Type "dmake" and watch the fun.
|
||||
The standard OS-9 "make" will probably not work. If you don't
|
||||
have dmake, you can get a copy from os9archive.rtsi.com.
|
||||
|
||||
6. If the make succeeds, it will generate the programs "less" and
|
||||
"lesskey" in your current directory. Test the generated programs.
|
||||
|
||||
7. When satisfied that it works, if you wish to install it
|
||||
in a public place, type "dmake install".
|
||||
See step 6 of the Unix installation instructions for details
|
||||
on how to change the default installation directories.
|
||||
|
||||
=======================================================================
|
||||
ACKNOWLEDGMENTS:
|
||||
Some versions of the less distribution are packaged using
|
||||
Info-ZIP's compression utility.
|
||||
Info-ZIP's software is free and can be obtained as source
|
||||
code or executables from various anonymous-ftp sites,
|
||||
including ftp.uu.net:/pub/archiving/zip.
|
||||
+25
-14
@@ -3,33 +3,44 @@ import-module au
|
||||
$releases = 'http://guysalias.tk/misc/less/'
|
||||
|
||||
function global:au_SearchReplace {
|
||||
@{}
|
||||
@{
|
||||
".\tools\VERIFICATION.txt" = @{
|
||||
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
|
||||
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function global:au_BeforeUpdate {
|
||||
set-alias 7z $Env:chocolateyInstall\tools\7z.exe
|
||||
|
||||
$lessdir = "$PSScriptRoot\less-*-win*"
|
||||
rm $lessdir -Recurse -Force -ea ignore
|
||||
|
||||
Invoke-WebRequest $Latest.URL -OutFile less.7z
|
||||
7za x $PSScriptRoot\less.7z
|
||||
iwr $Latest.URL32 -OutFile "$PSScriptRoot\less.7z"
|
||||
7z x $PSScriptRoot\less.7z
|
||||
|
||||
rm $PSScriptRoot\tools\* -Recurse -Force
|
||||
rm $PSScriptRoot\tools\* -Recurse -Force -Exclude VERIFICATION.txt
|
||||
mv $lessdir\* $PSScriptRoot\tools -Force
|
||||
rm $lessdir -Recurse -Force -ea ignore
|
||||
rm $PSScriptRoot\less.7z -ea ignore
|
||||
}
|
||||
|
||||
function global:au_GetLatest {
|
||||
$download_page = Invoke-WebRequest -Uri $releases
|
||||
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
|
||||
|
||||
$re = 'less-.+win.+\.7z'
|
||||
$url = $download_page.links | ? href -match $re | select -First 1 -expand href
|
||||
|
||||
$version = ($url -split '-' | select -Index 1) / 100
|
||||
$url = $releases + $url
|
||||
|
||||
$Latest = @{ URL = $url; Version = $version }
|
||||
return $Latest
|
||||
$re = 'less-.+win.+\.7z$'
|
||||
$url = $download_page.links | ? href -match $re | select -First 1 -expand href
|
||||
$version = "$( ($url -split '-' | select -Index 1) / 100 )"
|
||||
@{
|
||||
URL32 = $releases + $url
|
||||
Version = $version
|
||||
}
|
||||
}
|
||||
|
||||
update
|
||||
try {
|
||||
update -ChecksumFor none
|
||||
} catch {
|
||||
$ignore = 'Unable to connect to the remote server'
|
||||
if ($_ -match $ignore) { Write-Host $ignore; 'ignore' } else { throw $_ }
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user