mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 19:54:54 -06:00
Add a -storage-name option to specify the name of the storage to be initialized
This commit is contained in:
@@ -216,7 +216,10 @@ func configRepository(context *cli.Context, init bool) {
|
|||||||
var storageURL string
|
var storageURL string
|
||||||
|
|
||||||
if init {
|
if init {
|
||||||
storageName = "default"
|
storageName = context.String("storage-name")
|
||||||
|
if len(storageName) == 0 {
|
||||||
|
storageName = "default"
|
||||||
|
}
|
||||||
snapshotID = context.Args()[0]
|
snapshotID = context.Args()[0]
|
||||||
storageURL = context.Args()[1]
|
storageURL = context.Args()[1]
|
||||||
} else {
|
} else {
|
||||||
@@ -1225,6 +1228,11 @@ func main() {
|
|||||||
Usage: "alternate location for the .duplicacy directory (absolute or relative to current directory)",
|
Usage: "alternate location for the .duplicacy directory (absolute or relative to current directory)",
|
||||||
Argument: "<path>",
|
Argument: "<path>",
|
||||||
},
|
},
|
||||||
|
cli.StringFlag{
|
||||||
|
Name: "storage-name",
|
||||||
|
Usage: "assign a name to the storage",
|
||||||
|
Argument: "<name>",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Usage: "Initialize the storage if necessary and the current directory as the repository",
|
Usage: "Initialize the storage if necessary and the current directory as the repository",
|
||||||
ArgsUsage: "<snapshot id> <storage url>",
|
ArgsUsage: "<snapshot id> <storage url>",
|
||||||
|
|||||||
Reference in New Issue
Block a user