aboutsummaryrefslogtreecommitdiff
path: root/src/update_pkg.c
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-05-24 10:23:38 +0000
committerdacctal <dacctal@symlinx.net>2026-05-24 10:23:38 +0000
commitaa0d78815004ae6b0c4a42b0e024f5c4ef555ae2 (patch)
tree62f97b4c5acfdb98003568466f878fbd3d6b9dfb /src/update_pkg.c
parent83d471f2c1d1b1fa6be51f41e4f1c36ab19d7094 (diff)
c rewrite
Diffstat (limited to 'src/update_pkg.c')
-rw-r--r--src/update_pkg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/update_pkg.c b/src/update_pkg.c
new file mode 100644
index 0000000..c0fdd92
--- /dev/null
+++ b/src/update_pkg.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include <string.h>
+
+#include "update_pkg.h"
+#include "is_updated.h"
+#include "install_pkg.h"
+
+void update_pkg(Pkg pkg) {
+ if (is_updated(pkg.src)) {
+ printf("%s%s is already up to date.\n", print_skipped, pkg.name);
+ return;
+ }
+ install_pkg(pkg);
+} \ No newline at end of file