From 03e8a0e5ff4eb02e6915eea24d0078111267aee4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 19 Sep 2024 21:53:24 +0200 Subject: [PATCH] Add support for PowerShell `conf.d` on Linux --- scripts/Arch/OS/install.fish | 5 +++-- scripts/Arch/Software/PowerShell/main.fish | 15 +++++++++++++++ scripts/Common/Software/PowerShell/main.fish | 11 +++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 scripts/Arch/Software/PowerShell/main.fish create mode 100755 scripts/Common/Software/PowerShell/main.fish diff --git a/scripts/Arch/OS/install.fish b/scripts/Arch/OS/install.fish index b0817a99..c46834c2 100755 --- a/scripts/Arch/OS/install.fish +++ b/scripts/Arch/OS/install.fish @@ -17,10 +17,11 @@ begin and source "$dir/../Software/pacman/main.fish" and source "$dir/../Software/yay/main.fish" + and source "$dir/../Software/PowerShell/main.fish" + and yayinst \ linux-headers \ - pacman-contrib \ - powershell-bin + pacman-contrib end source "$dir/../../Common/OS/install.fish" diff --git a/scripts/Arch/Software/PowerShell/main.fish b/scripts/Arch/Software/PowerShell/main.fish new file mode 100755 index 00000000..03c6f180 --- /dev/null +++ b/scripts/Arch/Software/PowerShell/main.fish @@ -0,0 +1,15 @@ +#!/bin/env fish +begin + set -l dir (status dirname) + source "$dir/../../Scripts/software.fish" + + function installSW + yayinst powershell-bin + end + + function configureSW -V dir + fish "$dir/../../../Common/Software/PowerShell/main.fish" configure + end + + runInstaller $argv +end diff --git a/scripts/Common/Software/PowerShell/main.fish b/scripts/Common/Software/PowerShell/main.fish new file mode 100755 index 00000000..a3d5123e --- /dev/null +++ b/scripts/Common/Software/PowerShell/main.fish @@ -0,0 +1,11 @@ +#!/bin/env fish +begin + set -l dir (status dirname) + source "$dir/../../Scripts/software.fish" + + function configureSW -V dir + sudo -HE pwsh "$dir/Manage.ps1" Configure + end + + runInstaller $argv +end