32 lines
579 B
Go
32 lines
579 B
Go
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]`
|
|
|
|
var config configCollect
|
|
opts, err := docopt.ParseDoc(usage)
|
|
if err != nil { log.Fatal(err) }
|
|
opts.Bind(&config)
|
|
|
|
checkRootFolder(config.Storage)
|
|
|
|
if config.Commits {
|
|
cmdCommit(config)
|
|
} else {
|
|
log.Fatal("This command is not implemented")
|
|
}
|
|
}
|