From 28e42104ac4c2e39d30d6c7ffb89a811ded4387e Mon Sep 17 00:00:00 2001 From: David Refoua Date: Fri, 14 Oct 2022 23:16:54 +0330 Subject: [PATCH] create save to directory if it doesn't exist --- scripts/pack.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 18bd728..5473ce1 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -1,6 +1,6 @@ <# .Synopsis - Pack cmder + Pack Cmder .DESCRIPTION Use this script to pack cmder into release archives @@ -36,7 +36,6 @@ Param( ) $cmderRoot = Resolve-Path $cmderRoot -$saveTo = Resolve-Path $saveTo . "$PSScriptRoot\utils.ps1" $ErrorActionPreference = "Stop" @@ -51,6 +50,12 @@ $targets = @{ Delete-Existing "..\Version*" Delete-Existing "..\build\*" +If(-not (Test-Path -PathType container $saveTo)) { + New-Item -ItemType Directory -Path $saveTo +} + +$saveTo = Resolve-Path $saveTo + $version = Get-VersionStr (New-Item -ItemType file "$cmderRoot\Version $version") | Out-Null