forked from StrafesNET/asset-tool
investigate podman container from the inside
This commit is contained in:
parent
0d92221a27
commit
fe326c8457
18
src/main.rs
18
src/main.rs
@ -20,6 +20,7 @@ struct Cli{
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum Commands{
|
||||
Info(InfoSubcommand),
|
||||
DownloadHistory(DownloadHistorySubcommand),
|
||||
Download(DownloadSubcommand),
|
||||
DownloadDecompile(DownloadDecompileSubcommand),
|
||||
@ -34,6 +35,11 @@ enum Commands{
|
||||
DecompileHistoryIntoGit(DecompileHistoryIntoGitSubcommand),
|
||||
DownloadAndDecompileHistoryIntoGit(DownloadAndDecompileHistoryIntoGitSubcommand),
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct InfoSubcommand{
|
||||
#[arg(long)]
|
||||
path:PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
struct DownloadHistorySubcommand{
|
||||
@ -271,10 +277,22 @@ impl Style{
|
||||
}
|
||||
}
|
||||
|
||||
async fn info(path:PathBuf)->AResult<()>{
|
||||
let dir=std::env::current_dir().unwrap();
|
||||
println!("pwd={:?}",dir);
|
||||
println!("path={path:?}");
|
||||
let mut read_dir=tokio::fs::read_dir(path).await?;
|
||||
while let Some(entry)=read_dir.next_entry().await?{
|
||||
println!("{:?}",entry);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main()->AResult<()>{
|
||||
let cli=Cli::parse();
|
||||
match cli.command{
|
||||
Commands::Info(subcommand)=>info(subcommand.path).await,
|
||||
Commands::DownloadHistory(subcommand)=>download_history(DownloadHistoryConfig{
|
||||
continue_from_versions:subcommand.continue_from_versions.unwrap_or(false),
|
||||
end_version:subcommand.end_version,
|
||||
|
Loading…
Reference in New Issue
Block a user