From f0634e0b8d7c3be3d4d83b4312736e7925fd3e12 Mon Sep 17 00:00:00 2001 From: chersbobers Date: Wed, 13 May 2026 13:10:08 +1200 Subject: [PATCH] All base commands added! This is big now adding mirrors! ---- :) --- bur.v | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/bur.v b/bur.v index c0cdbb1..9e6dbfe 100644 --- a/bur.v +++ b/bur.v @@ -30,6 +30,9 @@ fn main() { } install_function(args[2]) } + 'update' { + update_function() + } 'upgrade' { if args.len < 3 { println('error: please provide a package name') @@ -76,7 +79,7 @@ fn install_function(name string) { } fn update_function() { - println('checking mirror for upd's) + println('checking mirror for upds') manifest_url := 'https://inserthis/manifest.txt' resp := http.get(manifest_url) or { @@ -97,7 +100,6 @@ fn update_function() { println('done! packge list refreshed run bur upgrade [name] to see if it needs a upd') } - fn upgrade_function(name string) { hash_url := 'https://inserthis/' + name + '.hash' resp := http.get(hash_url) or { @@ -123,4 +125,29 @@ fn upgrade_function(name string) { os.write_file(hash_path, remote_hash) or { } } +fn remove_function(name string) { + if name == '' { + println('hey say a package to remove!') + return + } + + println('removing $name play the bugle ;_;') + + executable_path:= '/bin/$name.elf' + if os.exists(executable_path) { + os.rm(executable_path) or { + println('oh crud could not remove the binary') + } + } else { + println('HEY $name.elf was not found in /bin/!') + } + + hash_path := '/var/db/bur' + name + '.hash' + if os.exists(hash_path) { + os.rm(hash_path) or { } + } + + println('rip $name it has been removed') +} + //yello this is the bottom of the file \ No newline at end of file