feat: add .txt extensions to data files
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -56,8 +56,7 @@ fn add_user_to_groups(add_user_command: AddUserToGroupsCommand) -> Result<()> {
|
|||||||
log::info!("No user specified, using current user");
|
log::info!("No user specified, using current user");
|
||||||
whoami::username()
|
whoami::username()
|
||||||
});
|
});
|
||||||
log::info!("Adding user {} to groups...", user);
|
let groups = include_str!("../data/user_groups.txt").to_string();
|
||||||
let groups = include_str!("../data/user_groups").to_string();
|
|
||||||
|
|
||||||
let groups = groups
|
let groups = groups
|
||||||
.lines()
|
.lines()
|
||||||
@@ -204,11 +203,11 @@ fn install_rpm_fusion() -> Result<()> {
|
|||||||
|
|
||||||
fn manage_package(package_command: PackageCommand) -> Result<()> {
|
fn manage_package(package_command: PackageCommand) -> Result<()> {
|
||||||
let list = match &package_command.command {
|
let list = match &package_command.command {
|
||||||
PackageSubCommand::CommonList => include_str!("../data/common_list").to_string(),
|
PackageSubCommand::CommonList => include_str!("../data/common_list.txt").to_string(),
|
||||||
PackageSubCommand::AmdList => include_str!("../data/amd_list").to_string(),
|
PackageSubCommand::AmdList => include_str!("../data/amd_list.txt").to_string(),
|
||||||
PackageSubCommand::IntelList => include_str!("../data/intel_list").to_string(),
|
PackageSubCommand::IntelList => include_str!("../data/intel_list.txt").to_string(),
|
||||||
PackageSubCommand::GnomeExtraList => include_str!("../data/gnome_extra_list").to_string(),
|
PackageSubCommand::GnomeExtraList => include_str!("../data/gnome_extra_list.txt").to_string(),
|
||||||
PackageSubCommand::FirmwareList => include_str!("../data/firmware_list").to_string(),
|
PackageSubCommand::FirmwareList => include_str!("../data/firmware_list.txt").to_string(),
|
||||||
PackageSubCommand::CustomList(custom_list_command) => {
|
PackageSubCommand::CustomList(custom_list_command) => {
|
||||||
log::info!("Using custom list from {}", custom_list_command.file);
|
log::info!("Using custom list from {}", custom_list_command.file);
|
||||||
read_file!(&custom_list_command.file)?
|
read_file!(&custom_list_command.file)?
|
||||||
|
|||||||
Reference in New Issue
Block a user