mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2026-03-15 19:30:38 -07:00
feat(installer-pwsh): extract profile paths from profiles.ini files
This commit is contained in:
parent
34601bd7eb
commit
6cddce4dcf
1 changed files with 17 additions and 7 deletions
24
Install.ps1
24
Install.ps1
|
|
@ -211,13 +211,23 @@ function Check-FirefoxProfileConfigurations {
|
|||
Write-Host "[found]"
|
||||
}
|
||||
|
||||
function Check-FirefoxProfileConfigurations {
|
||||
param ([string[]]$InstallDirectories)
|
||||
# TODO: stub
|
||||
}
|
||||
|
||||
function Get-FirefoxProfilePaths {
|
||||
# TODO: stub
|
||||
param ([string[]]$InstallDirectories)
|
||||
|
||||
Write-Host -Nonewline "Checking path information for profiles... "
|
||||
|
||||
$AbsoluteProfiles = @()
|
||||
|
||||
foreach ($Directory in $InstallDirectories) {
|
||||
$InfoFileContents = (Get-Content -Path (-Join $Directory, "\", $ProfileInfoFile)) -Split "\n"
|
||||
$PathNames = $InfoFileContents
|
||||
.Where({$_ -Match "Path=.+"})
|
||||
.ForEach({$_ -Replace "Path=",""})
|
||||
.ForEach({$AbsoluteProfiles += (-Join $Directory, "\", $_)})
|
||||
}
|
||||
|
||||
# TODO: error handling
|
||||
return $AbsoluteProfiles
|
||||
}
|
||||
|
||||
function Install-LeptonToProfiles {
|
||||
|
|
@ -239,7 +249,7 @@ function Install-Lepton {
|
|||
Check-FirefoxProfileConfigurations $InstallationDirectories
|
||||
|
||||
# TODO: read profile paths in from profiles.ini files
|
||||
#$AsboluteProfilePaths = Get-FirefoxProfilePaths
|
||||
$AsboluteProfilePaths = Get-FirefoxProfilePaths
|
||||
|
||||
# TODO: install if in install mode
|
||||
#Install-LeptonToProfiles $AbsoluteProfilePaths
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue