change binary name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/ocis-pkg/clihelper"
|
||||
"github.com/opencloud-eu/opencloud/ocis-pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Execute is the entry point for the ocis command.
|
||||
func Execute() error {
|
||||
cfg := config.DefaultConfig()
|
||||
|
||||
app := clihelper.DefaultApp(&cli.App{
|
||||
Name: "opencloud",
|
||||
Usage: "opencloud",
|
||||
})
|
||||
|
||||
for _, fn := range register.Commands {
|
||||
app.Commands = append(
|
||||
app.Commands,
|
||||
fn(cfg),
|
||||
)
|
||||
}
|
||||
|
||||
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
||||
return app.RunContext(ctx, os.Args)
|
||||
}
|
||||
Reference in New Issue
Block a user