Files
packages/anda/tools/micro-default-editor/update.rhai
T
Raboneko 8d5bc2a5e9 fix?(micro-default-editor): Just dep on Micro (#5710) (#5714)
* fix?(micro-default-editor): Just dep on Micro



* chore(update.rhai): Handle GPG imports



---------


(cherry picked from commit 1c8d4767ab)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
2025-06-29 04:01:32 -05:00

10 lines
497 B
Plaintext

let v = sh("dnf info micro -y | grep Version | grep -Eo '[0-9]+\\.[0-9]+.*'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.version(v);
let r = sh("dnf info micro -y | grep Release | grep -Eo '[0-9]+' | head -1", #{"stdout": "piped"}).ctx.stdout;
r.pop();
rpm.f = sub(`Release: (.+?)\n`, "Release: " + r + "%{?dist}\n", rpm.f);
let e = sh("dnf info micro -y | grep Epoch | grep -Eo '[0-9]+'", #{"stdout": "piped"}).ctx.stdout;
e.pop();
rpm.f = sub(`Epoch: (.+?)\n`, "Epoch: " + e + "\n", rpm.f);