2019-06-25 11:42:17 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
2019-07-11 02:36:43 +00:00
|
|
|
logging "github.com/ipfs/go-log"
|
2019-06-25 11:42:17 +00:00
|
|
|
"gopkg.in/urfave/cli.v2"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/go-lotus/build"
|
|
|
|
lcli "github.com/filecoin-project/go-lotus/cli"
|
|
|
|
"github.com/filecoin-project/go-lotus/daemon"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-07-11 02:36:43 +00:00
|
|
|
logging.SetLogLevel("*", "INFO")
|
2019-06-25 11:42:17 +00:00
|
|
|
local := []*cli.Command{
|
|
|
|
daemon.Cmd,
|
|
|
|
}
|
|
|
|
|
|
|
|
app := &cli.App{
|
2019-06-28 09:03:28 +00:00
|
|
|
Name: "lotus",
|
|
|
|
Usage: "Filecoin decentralized storage network client",
|
2019-06-25 11:42:17 +00:00
|
|
|
Version: build.Version,
|
2019-07-10 17:10:19 +00:00
|
|
|
Flags: []cli.Flag{
|
|
|
|
&cli.StringFlag{
|
|
|
|
Name: "repo",
|
|
|
|
EnvVars: []string{"LOTUS_PATH"},
|
|
|
|
Hidden: true,
|
|
|
|
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
|
|
|
|
},
|
2019-07-08 19:07:16 +00:00
|
|
|
},
|
2019-06-25 11:42:17 +00:00
|
|
|
|
|
|
|
Commands: append(local, lcli.Commands...),
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
|
|
log.Println(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|