diff --git a/src/arduino.cc/arduino-builder/main.go b/src/arduino.cc/arduino-builder/main.go index 94b3b137..1dc8a33c 100644 --- a/src/arduino.cc/arduino-builder/main.go +++ b/src/arduino.cc/arduino-builder/main.go @@ -134,7 +134,15 @@ var loggerFlag *string var versionFlag *bool var vidPidFlag *string +var Usage = func(){ + fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) + fmt.Fprintf(os.Stderr, "\n\tarduino_builder -hardware -tools -fqbn [options] sketch_to_Compile\n\n") + fmt.Fprintf(os.Stderr, "Available flags:\n") + flag.PrintDefaults() +} + func init() { + flag.Usage = Usage compileFlag = flag.Bool(FLAG_ACTION_COMPILE, false, "compiles the given sketch") preprocessFlag = flag.Bool(FLAG_ACTION_PREPROCESS, false, "preprocess the given sketch") dumpPrefsFlag = flag.Bool(FLAG_ACTION_DUMP_PREFS, false, "dumps build properties used when compiling")