feat(installer-pwsh): create rough outline of installer functions

This commit is contained in:
James Upjohn 2021-07-13 15:30:14 +12:00
parent 6d32e1b613
commit 61ea032195
No known key found for this signature in database
GPG key ID: D27176569247601C

View file

@ -70,9 +70,48 @@ function Verify-PowerShellVersion {
}
}
function Select-LeptonDistribution {
param ([string]$CustomProfileDir)
# TODO: stub
}
function Check-FirefoxProfileDirectories {
param ([string]$CustomProfilePath)
# TODO: stub
}
function Check-FirefoxProfileConfigurations {
param ([string[]]$InstallDirectories)
# TODO: stub
}
function Get-FirefoxProfilePaths {
# TODO: stub
}
function Install-LeptonToProfiles {
param ([string[]]$PathsToInstall)
# TODO: stub
}
function Install-Lepton {
Write-Host -NoNewline "Checking PowerShell version... "
Verify-PowerShellVersion # Check installed version meets minimum
# TODO: select style distribution (Photon or Proton)
Select-LeptonDistribution
# TODO: check profile director{y,ies} (including custom)
$InstallationDirectories = Check-FirefoxProfileDirectories $ProfilePath
# TODO: check profile ini files exists
Check-FirefoxProfileConfigurations $InstallationDirectories
# TODO: read profile paths in from profiles.ini files
$AsboluteProfilePaths = Get-FirefoxProfilePaths
# TODO: install if in install mode
Install-LeptonToProfiles $AbsoluteProfilePaths
}
function Check-Help {