Make zoxide
installation cross platform
This commit is contained in:
parent
00076e2abb
commit
b31d25ea3a
19
scripts/Common/Software/zoxide/Main.ps1
Normal file
19
scripts/Common/Software/zoxide/Main.ps1
Normal file
|
@ -0,0 +1,19 @@
|
|||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../PowerShell/Profile.ps1";
|
||||
. "$PSScriptRoot/../../Scripts/Software.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Configurator {
|
||||
Add-PowerShellProfileStatement `
|
||||
-System `
|
||||
-Category "zoxide" `
|
||||
-Script (
|
||||
@(
|
||||
"# zoxide",
|
||||
(Get-ScriptInitializer "zoxide init powershell | Out-String")
|
||||
) -join [System.Environment]::NewLine);
|
||||
};
|
|
@ -8,7 +8,7 @@ begin
|
|||
source "$dir/../fish/profile.fish"
|
||||
echo 'eval "$(zoxide init bash)"' | installBashProfile "zoxide"
|
||||
echo "zoxide init fish | source" | installFishProfile "zoxide"
|
||||
sudo pwsh -NoProfile "$dir/install.ps1"
|
||||
sudo -HE pwsh -NoProfile "$dir/Main.ps1" Configure
|
||||
end
|
||||
|
||||
runInstaller $argv
|
||||
|
|
|
@ -3,21 +3,26 @@ param(
|
|||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Software/PowerShell/Profile.ps1";
|
||||
& {
|
||||
param(
|
||||
[hashtable] $Parameters
|
||||
)
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Software/PowerShell/Profile.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
$base = "$PSScriptRoot/../../../Common/Software/zoxide/Main.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
Install-ChocoPackage zoxide;
|
||||
Install-WingetPackage junegunn.fzf;
|
||||
} `
|
||||
-Configurator {
|
||||
Add-PowerShellProfileStatement `
|
||||
-System `
|
||||
-Category "zoxide" `
|
||||
-Script (
|
||||
@(
|
||||
"# zoxide",
|
||||
(Get-ScriptInitializer "zoxide init powershell | Out-String")
|
||||
) -join [System.Environment]::NewLine);
|
||||
param(
|
||||
$Arguments
|
||||
)
|
||||
|
||||
& $base ([InstallerAction]::Configure) @PSBoundParameters;
|
||||
};
|
||||
} $PSBoundParameters;
|
||||
|
|
Loading…
Reference in a new issue