A tmpfiles.d implementation for UNIX-like operating systems.
// dtmp: A tmpfiles.d implementation for UNIX-like operating systems.
// Copyright (C) 2025  Aster Boese
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

mod cli;

use crate::cli::Cli;

use dtmp_lib;

use clap::Parser;

fn main() -> Result<(), anyhow::Error> {
	let cli = Cli::parse();

	if cli.create {
		println!("Running create!");
		match dtmp_lib::actions::create() {
			Ok(..) => (),
			Err(e) => anyhow::bail!("Create failed with error:\n{}", e),
		}
	}
	if cli.clean {
		todo!();
	}
	if cli.remove {
		todo!();
	}
	if cli.purge {
		todo!()
	}

	Ok(())
}