File: init.ps1

package info (click to toggle)
editorconfig-core 0.12.9%2B~0.17.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 936 kB
  • sloc: ansic: 1,601; makefile: 16; sh: 10
file content (30 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
param(
    $pcre="10.40"
)

$ErrorActionPreference="Stop"
$dest = "bin"

if (Test-Path $dest){
    Remove-Item $dest -Recurse -Force -Confirm:$false
}

New-Item $dest -ItemType Directory -ErrorAction SilentlyContinue | Out-Null

#####################################################################
# pcre
#####################################################################
$url = "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$($pcre)/pcre2-$($pcre).zip"
$output = "$dest\pcre-$($pcre).zip"

"Downloading pcre2 v$pcre sources" | Write-Host -ForegroundColor DarkGreen
Start-BitsTransfer -Source $url -Destination $output

"Extracting pcre2 v$pcre sources" | Write-Host -ForegroundColor DarkGreen
Expand-Archive -Path $output -DestinationPath $dest
Rename-Item -Path "$dest\pcre2-$($pcre)" -NewName "pcre2"

if(Test-Path "pcre-$($pcre).patch") {
    "Applying pcre patches" | Write-Host -ForegroundColor DarkGreen
    .\patch.ps1 -patch "pcre-$($pcre).patch" -path $dest\pcre2
}