Add makefile and improve error message for no args

This commit is contained in:
Elara 2020-12-04 23:44:19 -08:00
parent 3e8b84b959
commit 7f3a95855c
2 changed files with 8 additions and 0 deletions

7
Makefile Normal file
View File

@ -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

View File

@ -176,6 +176,7 @@ func main() {
// Execute JSON action using files within opensend directory // Execute JSON action using files within opensend directory
config.ExecuteAction(opensendDir) config.ExecuteAction(opensendDir)
} else { } else {
flag.Usage()
log.Fatal().Msg("You must choose sender or receiver mode using -s or -r") log.Fatal().Msg("You must choose sender or receiver mode using -s or -r")
} }
// Remove opensend directory // Remove opensend directory