eee
This commit is contained in:
@@ -23,7 +23,7 @@ do {
|
|||||||
|
|
||||||
Clear-Host
|
Clear-Host
|
||||||
$selectedModule = $moduleNames[$moduleSelection - 1]
|
$selectedModule = $moduleNames[$moduleSelection - 1]
|
||||||
$actions = $modules[$selectedModule]
|
$actions = $modules[$selectedModule].Actions
|
||||||
Write-Host "Selected module: $selectedModule" -ForegroundColor Yellow
|
Write-Host "Selected module: $selectedModule" -ForegroundColor Yellow
|
||||||
|
|
||||||
if ($args.Count -ge 1) {
|
if ($args.Count -ge 1) {
|
||||||
@@ -45,4 +45,6 @@ if ($args.Count -ge 1) {
|
|||||||
Clear-Host
|
Clear-Host
|
||||||
Write-Host "Selected action: $action" -ForegroundColor Yellow
|
Write-Host "Selected action: $action" -ForegroundColor Yellow
|
||||||
|
|
||||||
& (Get-Variable $selectedModule).Value $action
|
# & (Get-Variable $selectedModule).Actions $action
|
||||||
|
$modulePath = $modules[$selectedModule].Path
|
||||||
|
& $modulePath $action
|
||||||
+25
-6
@@ -8,13 +8,32 @@ $packageManagerModule = "$PSScriptRoot\modules\package-manager.ps1"
|
|||||||
|
|
||||||
# Define available modules with their respective actions - need to ref
|
# Define available modules with their respective actions - need to ref
|
||||||
$modules = @{
|
$modules = @{
|
||||||
"appsDataManagerModule" = @("reconnect", "connect", "disconnect")
|
"AppData Manager" = @{
|
||||||
"autostartManagerModule" = @("update", "remove")
|
Path = $appsDataManagerModule
|
||||||
"deployModule" = @("apply", "clean")
|
Actions = @("reconnect", "connect", "disconnect")
|
||||||
"mountsManagerModule" = @("reconnect", "connect", "disconnect")
|
|
||||||
"packageManagerModule" = @("install", "uninstall")
|
|
||||||
"wingetInstallerModule" = @("check", "install")
|
|
||||||
}
|
}
|
||||||
|
"Autostart Manager" = @{
|
||||||
|
Path = $autostartManagerModule
|
||||||
|
Actions = @("update", "remove")
|
||||||
|
}
|
||||||
|
"Deploy Manager" = @{
|
||||||
|
Path = $deployModule
|
||||||
|
Actions = @("apply", "clean")
|
||||||
|
}
|
||||||
|
"Mounts Manager" = @{
|
||||||
|
Path = $mountsManagerModule
|
||||||
|
Actions = @("reconnect", "connect", "disconnect")
|
||||||
|
}
|
||||||
|
"Package Manager" = @{
|
||||||
|
Path = $packageManagerModule
|
||||||
|
Actions = @("install", "uninstall")
|
||||||
|
}
|
||||||
|
"Winget Installer" = @{
|
||||||
|
Path = $wingetInstallerModule
|
||||||
|
Actions = @("check", "install")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
function checkWingetStatus {
|
function checkWingetStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user