Skip to content

Commit

Permalink
Folder creation
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-harmoniq committed Nov 27, 2017
1 parent 946c6c3 commit 12e161b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion netpkg-tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Authors>Phil Hawkins</Authors>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<VersionPrefix>0.4.0</VersionPrefix>
<VersionPrefix>0.3.10</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
<Description>Bundle .NET Core applications into convenient Linux binaries using appimagetool</Description>
<Copyright>MIT</Copyright>
Expand Down

0 comments on commit 12e161b

Please sign in to comment.