Skip to content

Commit

Permalink
Add Cmd for files
Browse files Browse the repository at this point in the history
  • Loading branch information
szeweq committed May 30, 2024
1 parent ec560cb commit d7abb70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bin/mc-repack/cli_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ pub struct Args {
pub enum Cmd {
/// Repack archives
Jars(JarsArgs),
// /// Optimize files
// Files(FilesArgs)

/// Optimize files
Files(FilesArgs),

/// Check the config file
Check(CommonArgs)
Expand All @@ -39,7 +40,7 @@ pub struct JarsArgs {
pub zopfli: Option<std::num::NonZeroU8>,

/// Keep directory entries in the archive
#[arg(long)]
#[arg(short = 'd', long)]
pub keep_dirs: bool,

#[command(flatten)]
Expand Down
3 changes: 3 additions & 0 deletions src/bin/mc-repack/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ fn main() -> Result_<()> {
process_jars(fit, ja, &repack_opts, &mut ec)?;
print_entry_errors(ec.results());
}
Cmd::Files(_fa) => {
println!("The files command is reserved for future use!");
}
Cmd::Check(ca) => {
if config::check(ca.config.clone())? {
println!("Config file is valid!");
Expand Down

0 comments on commit d7abb70

Please sign in to comment.