Skip to content

Commit

Permalink
Merge pull request #3 from filedrive-team/feature
Browse files Browse the repository at this point in the history
Modify subcommand
  • Loading branch information
beeleelee authored May 7, 2021
2 parents d529560 + f9d3486 commit 8f77630
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.PHONY: build
build:
go build -ldflags "-s -w" -o graphsplit graphsplit.go utils.go retrieve.go
go build -ldflags "-s -w" -o graphsplit graphsplit.go utils.go restore.go
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Import car file to IPFS:
ipfs dag import /path/to/car-dir/car-file
```

Retrieve files:
Restore files:
```sh
# car-path: directory or file, in form of .car
# output-dir: usually just be the same as /path/to/output-dir
# parallel: number goroutines run when retrieving
./graphsplit retrieve \
# parallel: number goroutines run when restoring
./graphsplit restore \
--car-path=/path/to/car-path \
--output-dir=/path/to/output-dir \
--parallel=2
Expand Down
8 changes: 4 additions & 4 deletions graphsplit.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
logging.SetLogLevel("*", "INFO")
local := []*cli.Command{
chunkCmd,
retrieveCmd,
restoreCmd,
}

app := &cli.App{
Expand Down Expand Up @@ -170,9 +170,9 @@ var chunkCmd = &cli.Command{
},
}

var retrieveCmd = &cli.Command{
Name: "retrieve",
Usage: "Retrieve files from CAR files",
var restoreCmd = &cli.Command{
Name: "restore",
Usage: "Restore files from CAR files",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "car-path",
Expand Down
File renamed without changes.

0 comments on commit 8f77630

Please sign in to comment.