firefox
This commit is contained in:
parent
5d03f8fb38
commit
c5f9dad0f9
18 changed files with 1845 additions and 0 deletions
24
scripts/build-xpi.ps1
Normal file
24
scripts/build-xpi.ps1
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
param(
|
||||
[string]$Source = "firefox",
|
||||
[string]$Output = "firefox-extension.xpi"
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$repoRoot = Resolve-Path (Join-Path $scriptRoot "..")
|
||||
$sourcePath = Join-Path $repoRoot $Source
|
||||
$outputPath = Join-Path $repoRoot $Output
|
||||
|
||||
if (-not (Test-Path -Path $sourcePath -PathType Container)) {
|
||||
throw "Source folder '$sourcePath' was not found."
|
||||
}
|
||||
|
||||
if (Test-Path -Path $outputPath -PathType Leaf) {
|
||||
Remove-Item -Path $outputPath -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $sourcePath "*") -DestinationPath $outputPath -Force
|
||||
|
||||
Write-Host "Created XPI at $outputPath"
|
||||
Loading…
Add table
Add a link
Reference in a new issue