From 89bb12428ff88503731d774b3aaddf7716b0e67c Mon Sep 17 00:00:00 2001 From: Iristyle Date: Mon, 22 Oct 2012 15:13:00 -0400 Subject: [PATCH] Move Get-IniContent, Out-IniFile, WaitForSuccess - These scripts are universally useful and should be maintained once --- SABnzbd/SABnzbd.nuspec | 1 + SABnzbd/tools/WaitForSuccess.ps1 | 24 -------------------- Sickbeard/Sickbeard.nuspec | 3 +++ {SickBeard/tools => core}/Get-IniContent.ps1 | 0 {SickBeard/tools => core}/Out-IniFile.ps1 | 0 {Sickbeard/tools => core}/WaitForSuccess.ps1 | 0 6 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 SABnzbd/tools/WaitForSuccess.ps1 rename {SickBeard/tools => core}/Get-IniContent.ps1 (100%) rename {SickBeard/tools => core}/Out-IniFile.ps1 (100%) rename {Sickbeard/tools => core}/WaitForSuccess.ps1 (100%) diff --git a/SABnzbd/SABnzbd.nuspec b/SABnzbd/SABnzbd.nuspec index 64f3a89..bfe377a 100644 --- a/SABnzbd/SABnzbd.nuspec +++ b/SABnzbd/SABnzbd.nuspec @@ -58,6 +58,7 @@ Note that if this is a first time install it will be necessary to configure SABn Fix UI refresh issue when using Safari on iOS6 (Safari bug) + diff --git a/SABnzbd/tools/WaitForSuccess.ps1 b/SABnzbd/tools/WaitForSuccess.ps1 deleted file mode 100644 index 45c6ecd..0000000 --- a/SABnzbd/tools/WaitForSuccess.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -function WaitForSuccess([ScriptBlock] $script, [int]$seconds = 10, - [string]$description = 'operation to complete') -{ - $skip = $false - Write-Host "Waiting up to $($seconds)s for $description..." - $result = 0..($seconds * 2) | - % { - if ($skip) { return $true } - $status = &$script - if ($status -eq $true) - { - $skip = $true - return $true - } - elseif ($service) - { - Start-Sleep -Milliseconds 500 - } - return $false - } | - Select -Last 1 - - return $result -} diff --git a/Sickbeard/Sickbeard.nuspec b/Sickbeard/Sickbeard.nuspec index f672f17..12b9cde 100644 --- a/Sickbeard/Sickbeard.nuspec +++ b/Sickbeard/Sickbeard.nuspec @@ -38,6 +38,9 @@ + + + diff --git a/SickBeard/tools/Get-IniContent.ps1 b/core/Get-IniContent.ps1 similarity index 100% rename from SickBeard/tools/Get-IniContent.ps1 rename to core/Get-IniContent.ps1 diff --git a/SickBeard/tools/Out-IniFile.ps1 b/core/Out-IniFile.ps1 similarity index 100% rename from SickBeard/tools/Out-IniFile.ps1 rename to core/Out-IniFile.ps1 diff --git a/Sickbeard/tools/WaitForSuccess.ps1 b/core/WaitForSuccess.ps1 similarity index 100% rename from Sickbeard/tools/WaitForSuccess.ps1 rename to core/WaitForSuccess.ps1