Skip to content
Snippets Groups Projects
Verified Commit 56492b50 authored by nfontrod's avatar nfontrod
Browse files

src/main.rs add prune subcommand

parent ecbacfd6
No related branches found
No related tags found
No related merge requests found
use crate::delete::Delete; use crate::delete::Delete;
use crate::prune::Prune;
use clap::{Args, Parser, Subcommand}; use clap::{Args, Parser, Subcommand};
mod checkout; mod checkout;
mod commit; mod commit;
...@@ -8,6 +9,7 @@ mod diff; ...@@ -8,6 +9,7 @@ mod diff;
mod init; mod init;
mod list; mod list;
mod mount; mod mount;
mod prune;
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
#[clap(name = "gbl")] #[clap(name = "gbl")]
...@@ -58,10 +60,21 @@ enum Commands { ...@@ -58,10 +60,21 @@ enum Commands {
Mount(Mount), Mount(Mount),
/// Unmount everything in the folder .mount /// Unmount everything in the folder .mount
Umount, Umount,
/// This command delete an archive from the repository or the complete repository /// This command deletes an archive from the repository or the complete repository
/// ///
/// This is basically a wrapper of the borg delete command /// This is basically a wrapper of the borg delete command
///
/// You can visit:
/// https://borgbackup.readthedocs.io/en/stable/usage/delete.html for more details
Delete(Delete), Delete(Delete),
/// This command prunes the .borg repository. This can be used to keep only
/// archive created during a given time interval
///
/// This is basically a wrapper of the borg prune command
///
/// You can visit:
/// https://borgbackup.readthedocs.io/en/stable/usage/prune.html for more details
Prune(Prune),
} }
#[derive(Debug, Args)] #[derive(Debug, Args)]
...@@ -237,5 +250,8 @@ fn main() { ...@@ -237,5 +250,8 @@ fn main() {
Commands::Delete(my_delete) => { Commands::Delete(my_delete) => {
delete::deletion_launcher(my_delete); delete::deletion_launcher(my_delete);
} }
Commands::Prune(my_prune) => {
prune::prune_launcher(my_prune);
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment