From 7f3a95855c582da25ea97ada2b2d13024aad6af9 Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Fri, 4 Dec 2020 23:44:19 -0800 Subject: [PATCH] Add makefile and improve error message for no args --- Makefile | 7 +++++++ main.go | 1 + 2 files changed, 8 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..564e7dd --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +GOBUILD ?= go build + +all: main.go logging.go keyExchange.go keyCrypto.go files.go fileCrypto.go deviceDiscovery.go config.go + $(GOBUILD) + +install: opensend + install -Dm755 opensend $(DESTDIR)/usr/bin/opensend \ No newline at end of file diff --git a/main.go b/main.go index e931a69..494e4eb 100644 --- a/main.go +++ b/main.go @@ -176,6 +176,7 @@ func main() { // Execute JSON action using files within opensend directory config.ExecuteAction(opensendDir) } else { + flag.Usage() log.Fatal().Msg("You must choose sender or receiver mode using -s or -r") } // Remove opensend directory