feat: support for pkgfile (#1306)

This commit is contained in:
Rafael Scalet
2025-09-10 08:31:27 -03:00
committed by GitHub
parent 0926bd2f6c
commit b662fae11e
2 changed files with 16 additions and 0 deletions

View File

@@ -116,6 +116,7 @@ pub enum Step {
Pipxu,
Pixi,
Pkg,
Pkgfile,
Pkgin,
PlatformioCore,
Pnpm,
@@ -457,6 +458,11 @@ impl Step {
#[cfg(target_os = "android")]
runner.execute(*self, "Termux Packages", || android::upgrade_packages(ctx))?
}
Pkgfile =>
{
#[cfg(target_os = "linux")]
runner.execute(*self, "pkgfile", || linux::run_pkgfile(ctx))?
}
Pkgin =>
{
#[cfg(unix)]
@@ -719,6 +725,7 @@ pub(crate) fn default_steps() -> Vec<Step> {
Waydroid,
AutoCpufreq,
CinnamonSpices,
Pkgfile,
]);
#[cfg(target_os = "freebsd")]

View File

@@ -683,6 +683,15 @@ pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> {
upgrade_cmd.arg("-Up").status_checked()
}
pub fn run_pkgfile(ctx: &ExecutionContext) -> Result<()> {
let sudo = ctx.require_sudo()?;
let pkgfile = require("pkgfile")?;
print_separator("pkgfile");
sudo.execute(ctx, pkgfile)?.arg("--update").status_checked()
}
pub fn run_packer_nu(ctx: &ExecutionContext) -> Result<()> {
let nu = require("nu")?;
let packer_home = HOME_DIR.join(".local/share/nushell/packer");