seafile_recovery/seafile_recovery.go

32 lines
579 B
Go
Raw Normal View History

2021-04-21 12:25:35 +00:00
package main
import (
"log"
"github.com/docopt/docopt-go"
)
func main() {
usage := `Seafile Recovery.
Usage:
seafile_recovery [--storage=<sto>] commits <repoid>
seafile_recovery (-h | --help)
Options:
-h --help Show this screen
--storage=<sto> Set Seafile storage path [default: ./storage]`
2021-04-21 12:44:49 +00:00
var config configCollect
2021-04-21 12:25:35 +00:00
opts, err := docopt.ParseDoc(usage)
if err != nil { log.Fatal(err) }
opts.Bind(&config)
2021-04-21 12:44:49 +00:00
checkRootFolder(config.Storage)
if config.Commits {
cmdCommit(config)
} else {
log.Fatal("This command is not implemented")
}
2021-04-21 12:25:35 +00:00
}