mirror of
https://github.com/r-darwish/topgrade
synced 2024-07-08 20:16:24 +00:00
Support deb-get (#925)
This commit is contained in:
parent
8e7fd6772d
commit
fdf03f6548
14
.vscode/tasks.json
vendored
Normal file
14
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "cargo",
|
||||||
|
"command": "clippy",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$rustc"
|
||||||
|
],
|
||||||
|
"group": "test",
|
||||||
|
"label": "rust: cargo clippy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -81,6 +81,7 @@ pub enum Step {
|
||||||
ConfigUpdate,
|
ConfigUpdate,
|
||||||
Containers,
|
Containers,
|
||||||
CustomCommands,
|
CustomCommands,
|
||||||
|
DebGet,
|
||||||
Deno,
|
Deno,
|
||||||
Dotnet,
|
Dotnet,
|
||||||
Emacs,
|
Emacs,
|
||||||
|
|
|
@ -351,6 +351,7 @@ fn run() -> Result<()> {
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
{
|
{
|
||||||
|
runner.execute(Step::DebGet, "deb-get", || linux::run_deb_get(&ctx))?;
|
||||||
runner.execute(Step::Toolbx, "toolbx", || toolbx::run_toolbx(&ctx))?;
|
runner.execute(Step::Toolbx, "toolbx", || toolbx::run_toolbx(&ctx))?;
|
||||||
runner.execute(Step::Flatpak, "Flatpak", || linux::flatpak_update(&ctx))?;
|
runner.execute(Step::Flatpak, "Flatpak", || linux::flatpak_update(&ctx))?;
|
||||||
runner.execute(Step::Snap, "snap", || linux::run_snap(sudo.as_ref(), run_type))?;
|
runner.execute(Step::Snap, "snap", || linux::run_snap(sudo.as_ref(), run_type))?;
|
||||||
|
|
|
@ -313,6 +313,20 @@ fn upgrade_debian(ctx: &ExecutionContext) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_deb_get(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
let deb_get = require("deb-get")?;
|
||||||
|
|
||||||
|
print_separator("deb-get");
|
||||||
|
|
||||||
|
ctx.execute_elevated(&deb_get, false)?.arg("upgrade").check_run()?;
|
||||||
|
|
||||||
|
if ctx.config().cleanup() {
|
||||||
|
ctx.execute_elevated(&deb_get, false)?.arg("clean").check_run()?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
fn upgrade_solus(ctx: &ExecutionContext) -> Result<()> {
|
fn upgrade_solus(ctx: &ExecutionContext) -> Result<()> {
|
||||||
if let Some(sudo) = ctx.sudo() {
|
if let Some(sudo) = ctx.sudo() {
|
||||||
ctx.run_type().execute(&sudo).args(&["eopkg", "upgrade"]).check_run()?;
|
ctx.run_type().execute(&sudo).args(&["eopkg", "upgrade"]).check_run()?;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user