mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Add clean command for zvm
module (#1060)
This commit is contained in:
parent
3dc7970478
commit
a519391358
1 changed files with 15 additions and 0 deletions
|
@ -103,6 +103,21 @@ export def "zvm remove" [
|
||||||
echo $"Successfully removed Zig ($zig_to_remove.version)"
|
echo $"Successfully removed Zig ($zig_to_remove.version)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove unused versions
|
||||||
|
export def "zvm clean" [] {
|
||||||
|
let versions_to_remove = zvm list --system | where active == false | get version
|
||||||
|
if ($versions_to_remove | is-empty) {
|
||||||
|
print "No unused version to remove"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let path_prefix = get_or_create_path_prefix
|
||||||
|
for v in $versions_to_remove {
|
||||||
|
rm --recursive --permanent $"($path_prefix)/($v)"
|
||||||
|
}
|
||||||
|
echo $"Successfully removed the following unused versions:\n($versions_to_remove)"
|
||||||
|
}
|
||||||
|
|
||||||
def verify_signature [temp_dir: string, tarball: string] {
|
def verify_signature [temp_dir: string, tarball: string] {
|
||||||
http get $"($tarball).minisig" | save $"($temp_dir)/($tarball | path basename).minisig"
|
http get $"($tarball).minisig" | save $"($temp_dir)/($tarball | path basename).minisig"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue