2016-08-05 18:12:27 +02:00
|
|
|
package authorize
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ncw/rclone/cmd"
|
|
|
|
"github.com/ncw/rclone/fs"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2016-10-22 13:05:45 +02:00
|
|
|
cmd.Root.AddCommand(commandDefintion)
|
2016-08-05 18:12:27 +02:00
|
|
|
}
|
|
|
|
|
2016-10-22 13:05:45 +02:00
|
|
|
var commandDefintion = &cobra.Command{
|
2016-08-05 18:12:27 +02:00
|
|
|
Use: "authorize",
|
|
|
|
Short: `Remote authorization.`,
|
|
|
|
Long: `
|
|
|
|
Remote authorization. Used to authorize a remote or headless
|
|
|
|
rclone from a machine with a browser - use as instructed by
|
|
|
|
rclone config.`,
|
|
|
|
Run: func(command *cobra.Command, args []string) {
|
|
|
|
cmd.CheckArgs(1, 3, command, args)
|
|
|
|
fs.Authorize(args)
|
|
|
|
},
|
|
|
|
}
|