Add step for installing Nextcloud

This commit is contained in:
Manuel Thalmann 2023-06-30 13:17:00 +02:00
parent 7b9392a539
commit 550cb86241
3 changed files with 25 additions and 0 deletions
scripts/Windows/Software/Nextcloud

View file

@ -0,0 +1,18 @@
. "$PSScriptRoot/../../Scripts/Context.ps1";
$null = New-Module {
function Restore-Nextcloud([Context] $context) {
if (-not (choco list --exact nextcloud-client)) {
choco install nextcloud-client -y --params="'/KeepUpdateCheck'";
}
while (-not (Test-Path $context.GetNextcloudConfigFile())) {
Write-Host "Nextcloud has been installed!";
Write-Host "Please log in in the Nextcloud app to continue.";
if (-not (Test-Path $context.GetNextcloudConfigFile())) {
Write-Error "The login seems to have failed. Please try again.";
}
}
}
}