script-launcher/install-as-dotnet-tool.sh

13 lines
250 B
Bash
Executable file

#!/usr/bin/env bash
dotnet pack ./src -o ./nupkg
EXISTS=$(command -v script-launcher)
if [ "$EXISTS" ]; then
ACTION="update"
else
ACTION="install"
fi
dotnet tool "$ACTION" -g ScriptLauncher --add-source ./nupkg --ignore-failed-sources