Add step for installing Nextcloud
This commit is contained in:
parent
7b9392a539
commit
550cb86241
3 changed files with 25 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
. "$PSScriptRoot/../Software/git/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/LGHub/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/ManiaPlanet/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/Nextcloud/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/osu!/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/osu!lazer/Manage.ps1";
|
||||
. "$PSScriptRoot/../Software/PuTTY/Manage.ps1";
|
||||
|
@ -26,5 +27,7 @@ function Backup-PersonalApps([Context] $context) {
|
|||
}
|
||||
|
||||
function Restore-PersonalApps([Context] $context) {
|
||||
choco feature enable -n useEnhancedExitCodes;
|
||||
Restore-Nextcloud $context;
|
||||
Restore-Git $context;
|
||||
}
|
||||
|
|
|
@ -205,6 +205,10 @@ class Context {
|
|||
});
|
||||
}
|
||||
|
||||
[string] GetNextcloudConfigFile() {
|
||||
return "$env:APPDATA/Nextcloud/nextcloud.cfg";
|
||||
}
|
||||
|
||||
[void] Reboot() {
|
||||
Write-Host "Restarting Computer...";
|
||||
$this.RegisterReboot();
|
||||
|
|
18
scripts/Windows/Software/Nextcloud/Manage.ps1
Normal file
18
scripts/Windows/Software/Nextcloud/Manage.ps1
Normal 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.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue