From 12e161ba890beafa86b5f8acf542cb3c93565885 Mon Sep 17 00:00:00 2001 From: Phil H Date: Sun, 26 Nov 2017 21:21:31 -0500 Subject: [PATCH] Folder creation --- Program.cs | 12 ++++++++++-- netpkg-tool.csproj | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index 6bd545c..15de994 100644 --- a/Program.cs +++ b/Program.cs @@ -50,11 +50,19 @@ static void Main(string[] args) static void CheckPaths(string[] args) { if (args.Length < 2 || !Directory.Exists(args[0]) && !Directory.Exists(args[1])) + { ExitWithError("You must specify a valid .NET project AND Destination folder.", 6); + } if (Directory.Exists(args[0]) && !Directory.Exists(args[1])) - ExitWithError($"{args[1]} is not a valid folder", 7); + { + if (Bash.Command($"mkdir -p {args[1]}").ExitCode != 0) + ExitWithError($"{args[1]} is not a valid folder", 7); + } if (!Directory.Exists(args[0]) && Directory.Exists(args[1])) - ExitWithError($"{args[0]} is not a valid folder", 8); + { + if (Bash.Command($"mkdir -p {args[0]}").ExitCode != 0) + ExitWithError($"{args[0]} is not a valid folder", 8); + } ProjectDir = GetRelativePath(args[0]); Destination = GetRelativePath(args[1]); diff --git a/netpkg-tool.csproj b/netpkg-tool.csproj index 60f0d6c..84d3966 100644 --- a/netpkg-tool.csproj +++ b/netpkg-tool.csproj @@ -7,7 +7,7 @@ Phil Hawkins Exe netcoreapp2.0 - 0.4.0 + 0.3.10 alpha Bundle .NET Core applications into convenient Linux binaries using appimagetool MIT