From a4fe1ba84aa0b4a04ffdf826f1bbb5a00f0debb1 Mon Sep 17 00:00:00 2001
From: Marcello Lamonaca <marcello@lamonaca.eu>
Date: Wed, 25 May 2022 18:20:53 +0200
Subject: [PATCH] Allow installation as dotnet tool

---
 dotnet-install-tool.ps1   | 2 ++
 src/ScriptLauncher.csproj | 2 ++
 2 files changed, 4 insertions(+)
 create mode 100644 dotnet-install-tool.ps1

diff --git a/dotnet-install-tool.ps1 b/dotnet-install-tool.ps1
new file mode 100644
index 0000000..4815a6d
--- /dev/null
+++ b/dotnet-install-tool.ps1
@@ -0,0 +1,2 @@
+dotnet pack ./src -o ./nupkg
+dotnet tool install -g ScriptLauncher --add-source ./nupkg --ignore-failed-sources
\ No newline at end of file
diff --git a/src/ScriptLauncher.csproj b/src/ScriptLauncher.csproj
index febac53..ac43673 100644
--- a/src/ScriptLauncher.csproj
+++ b/src/ScriptLauncher.csproj
@@ -6,6 +6,8 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <Version>0.1.0</Version>
+    <PackAsTool>true</PackAsTool>
+    <ToolCommandName>script-launcher</ToolCommandName>
   </PropertyGroup>
 
   <ItemGroup>