Dmitry Nefedov
2 years ago
7 changed files with 90 additions and 88 deletions
@ -1,26 +1,32 @@ |
|||||
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json |
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json |
||||
$Parameters = @{ |
$Parameters = @{ |
||||
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" |
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" |
||||
} |
} |
||||
$LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2019 |
$LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2019 |
||||
|
|
||||
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Verbose |
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Verbose |
||||
|
|
||||
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" -ItemType Directory -Force |
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" -ItemType Directory -Force |
||||
|
|
||||
$Parameters = @{ |
$Parameters = @{ |
||||
Path = @("Scripts\PolicyFileEditor") |
Path = @("Scripts\LGPO.exe") |
||||
Destination = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" |
Destination = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease\bin" |
||||
Recurse = $true |
Recurse = $true |
||||
Force = $true |
Force = $true |
||||
} |
} |
||||
Copy-Item @Parameters |
Copy-Item @Parameters |
||||
|
|
||||
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2019" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease" -Recurse -Force |
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2019" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease" -Recurse -Force |
||||
|
|
||||
$Parameters = @{ |
$Parameters = @{ |
||||
Path = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease" |
Path = "Sophia_Script_for_Windows_10_LTSC_2019_v$LatestRelease" |
||||
DestinationPath = "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" |
DestinationPath = "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" |
||||
CompressionLevel = "Fastest" |
CompressionLevel = "Fastest" |
||||
Force = $true |
Force = $true |
||||
} |
} |
||||
Compress-Archive @Parameters |
Compress-Archive @Parameters |
||||
|
|
||||
# Calculate hash |
# Calculate hash |
||||
Get-Item -Path "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Force | ForEach-Object -Process { |
Get-Item -Path "Sophia.Script.for.Windows.10.LTSC.2019.v$LatestRelease.zip" -Force | ForEach-Object -Process { |
||||
"$($_.Name) $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)" |
"$($_.Name) $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)" |
||||
} | Add-Content -Path SHA256SUM -Encoding utf8 -Force |
} | Add-Content -Path SHA256SUM -Encoding utf8 -Force |
||||
|
Loading…
Reference in new issue