feat: support for pkgfile (#1306)
This commit is contained in:
@@ -116,6 +116,7 @@ pub enum Step {
|
|||||||
Pipxu,
|
Pipxu,
|
||||||
Pixi,
|
Pixi,
|
||||||
Pkg,
|
Pkg,
|
||||||
|
Pkgfile,
|
||||||
Pkgin,
|
Pkgin,
|
||||||
PlatformioCore,
|
PlatformioCore,
|
||||||
Pnpm,
|
Pnpm,
|
||||||
@@ -457,6 +458,11 @@ impl Step {
|
|||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
runner.execute(*self, "Termux Packages", || android::upgrade_packages(ctx))?
|
runner.execute(*self, "Termux Packages", || android::upgrade_packages(ctx))?
|
||||||
}
|
}
|
||||||
|
Pkgfile =>
|
||||||
|
{
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
runner.execute(*self, "pkgfile", || linux::run_pkgfile(ctx))?
|
||||||
|
}
|
||||||
Pkgin =>
|
Pkgin =>
|
||||||
{
|
{
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
@@ -719,6 +725,7 @@ pub(crate) fn default_steps() -> Vec<Step> {
|
|||||||
Waydroid,
|
Waydroid,
|
||||||
AutoCpufreq,
|
AutoCpufreq,
|
||||||
CinnamonSpices,
|
CinnamonSpices,
|
||||||
|
Pkgfile,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
#[cfg(target_os = "freebsd")]
|
#[cfg(target_os = "freebsd")]
|
||||||
|
|||||||
@@ -683,6 +683,15 @@ pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
upgrade_cmd.arg("-Up").status_checked()
|
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<()> {
|
pub fn run_packer_nu(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let nu = require("nu")?;
|
let nu = require("nu")?;
|
||||||
let packer_home = HOME_DIR.join(".local/share/nushell/packer");
|
let packer_home = HOME_DIR.join(".local/share/nushell/packer");
|
||||||
|
|||||||
Reference in New Issue
Block a user