feat: support for pkgfile (#1306)
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user