Skip to content

Commit

Permalink
Merge pull request #7 from rsWinAutomationSupport/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Horacio Fernandez committed Aug 28, 2015
2 parents cd28c47 + 3333da9 commit 8f63b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DSCResources/RS_rsModuleZipSum/RS_rsModuleZipSum.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Function Test-TargetResource {
if($modules) {
foreach($module in $modules) {
if(Test-Path -Path $((Join-Path $modulePath -ChildPath $module), '\', $($module, '.psd1' -join '') -join '')) {
$moduleName = $($module, '_', $(((Get-Content -Path $((Join-Path $modulePath -ChildPath $module), $($module, ".psd1" -join '') -join '\')) -match "ModuleVersion") -replace 'ModuleVersion', '' -replace ' ', '' -replace '=', '' -replace "'", '' -replace '"', '') -join '')
$moduleName = $($module, '_', $(((Get-Content -Path $((Join-Path $modulePath -ChildPath $module), $($module, ".psd1" -join '') -join '\')) -match "ModuleVersion") -replace 'ModuleVersion', '' -replace ' ', '' -replace '=', '' -replace "'", '' -replace '"', '').Trim() -join '')

if(Test-Path -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip' -join ''))) {
if($((Get-FileHash -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip' -join '')) -ErrorAction SilentlyContinue).Hash) -eq $(Get-Content -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip.checksum' -join '')) -ErrorAction SilentlyContinue)) {
Expand Down Expand Up @@ -64,7 +64,7 @@ Function Set-TargetResource {
if($modules) {
foreach($module in $modules) {
if(Test-Path -Path $((Join-Path $modulePath -ChildPath $module), '\', $($module, '.psd1' -join '') -join '')) {
$moduleName = $($module, '_', $(((Get-Content -Path $((Join-Path $modulePath -ChildPath $module), $($module, ".psd1" -join '') -join '\')) -match "ModuleVersion") -replace 'ModuleVersion', '' -replace ' ', '' -replace '=', '' -replace "'", '' -replace '"', '') -join '')
$moduleName = $($module, '_', $(((Get-Content -Path $((Join-Path $modulePath -ChildPath $module), $($module, ".psd1" -join '') -join '\')) -match "ModuleVersion") -replace 'ModuleVersion', '' -replace ' ', '' -replace '=', '' -replace "'", '' -replace '"', '').Trim() -join '')
if(!(Test-Path -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip' -join ''))) -or !($((Get-FileHash -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip' -join '')) -ErrorAction SilentlyContinue).Hash) -eq $(Get-Content -Path $(Join-Path $destination -ChildPath $($moduleName, '.zip.checksum' -join '')) -ErrorAction SilentlyContinue))) {
Remove-Item -Path $((Join-Path $destination -ChildPath $module), '*' -join '') -Force
if($module -ne "PowerShellAccessControl") {
Expand Down

0 comments on commit 8f63b5e

Please sign in to comment.