# # # # New-Item -ItemType Directory -Force -Path dist $7zipPath = "$env:ProgramFiles\7-Zip\7z.exe" if (-not (Test-Path -Path $7zipPath -PathType Leaf)) { throw "7 zip executable '$7zipPath' not found" } Set-Alias Start-SevenZip $7zipPath Write-Host "PACK MOD" $code = Get-Content .\src\info.json -Raw | ConvertFrom-Json $name = $code.name + "_" + $code.version Write-Host ("Packing as $name") rm tmp -r -force mkdir tmp cp -r src tmp cp README.md tmp/src mv "tmp/src" "tmp/$name" cd tmp Start-SevenZip a -tzip "../dist/$name.zip" "./$name" cd .. rm tmp -r -force