feat: add step for mandb - user and system (update man entries) (#1319)
This commit is contained in:
@@ -692,6 +692,23 @@ pub fn run_pkgfile(ctx: &ExecutionContext) -> Result<()> {
|
||||
sudo.execute(ctx, pkgfile)?.arg("--update").status_checked()
|
||||
}
|
||||
|
||||
pub fn run_mandb(ctx: &ExecutionContext) -> Result<()> {
|
||||
let sudo = ctx.require_sudo()?;
|
||||
let mandb = require("mandb")?;
|
||||
|
||||
if !ctx.config().enable_mandb() {
|
||||
return Err(SkipStep(t!("ManDB isn't enabled").to_string()).into());
|
||||
}
|
||||
|
||||
print_separator(t!("System Manuals"));
|
||||
|
||||
sudo.execute(ctx, &mandb)?.status_checked()?;
|
||||
|
||||
print_separator(t!("User Manuals"));
|
||||
|
||||
ctx.execute(&mandb).arg("--user-db").status_checked()
|
||||
}
|
||||
|
||||
pub fn run_packer_nu(ctx: &ExecutionContext) -> Result<()> {
|
||||
let nu = require("nu")?;
|
||||
let packer_home = HOME_DIR.join(".local/share/nushell/packer");
|
||||
|
||||
Reference in New Issue
Block a user