Add makefile and improve error message for no args
This commit is contained in:
parent
3e8b84b959
commit
7f3a95855c
7
Makefile
Normal file
7
Makefile
Normal 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
|
1
main.go
1
main.go
@ -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
|
||||||
|
Reference in New Issue
Block a user