2022-09-19 14:57:59 +03:00
|
|
|
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
|
|
|
|
|
$Parameters = @{
|
2025-12-18 00:24:42 +03:00
|
|
|
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
|
|
|
|
|
UseBasicParsing = $true
|
|
|
|
|
Verbose = $true
|
2022-09-19 14:57:59 +03:00
|
|
|
}
|
2025-04-07 23:58:43 +03:00
|
|
|
$Latest_Release_Sophia_Script_Wrapper = (Invoke-RestMethod @Parameters).Sophia_Script_Wrapper
|
2022-09-19 14:57:59 +03:00
|
|
|
|
2025-04-07 23:58:43 +03:00
|
|
|
Write-Verbose -Message "Sophia.Script.Wrapper.v$Latest_Release_Sophia_Script_Wrapper.zip" -Verbose
|
2022-09-19 14:57:59 +03:00
|
|
|
|
2025-04-07 23:58:43 +03:00
|
|
|
New-Item -Path "Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper" -ItemType Directory -Force
|
2022-09-19 14:57:59 +03:00
|
|
|
|
2025-12-18 00:24:42 +03:00
|
|
|
# Copy Wrapper to new folder
|
|
|
|
|
Get-ChildItem -Path Wrapper -Exclude README.md -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper" -Recurse -Force
|
|
|
|
|
|
2022-09-19 14:57:59 +03:00
|
|
|
$Parameters = @{
|
2025-12-18 00:24:42 +03:00
|
|
|
Path = "Sophia_Script\Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper"
|
|
|
|
|
DestinationPath = "Sophia_Script\Sophia.Script.Wrapper.v$Latest_Release_Sophia_Script_Wrapper.zip"
|
2025-04-07 23:58:43 +03:00
|
|
|
CompressionLevel = "Fastest"
|
|
|
|
|
Force = $true
|
2022-09-19 14:57:59 +03:00
|
|
|
}
|
|
|
|
|
Compress-Archive @Parameters
|