From aaf9f4719dec7fa37bb9dac7b336ef40874de49b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 22 Jun 2025 13:19:07 +1200 Subject: [PATCH] 'Generic Commit' --- getpkg/src/main.cpp | 21 +++++---------------- getpkg/test.sh | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/getpkg/src/main.cpp b/getpkg/src/main.cpp index 680e2a1..7a12545 100644 --- a/getpkg/src/main.cpp +++ b/getpkg/src/main.cpp @@ -413,13 +413,10 @@ int update_tool(int argc, char* argv[]) { for (const auto& [name, status, version] : updateResults) { std::string displayStatus = status; if (status == "Updated") { - displayStatus = "✓ " + status; updatedCount++; } else if (status == "Up to date") { - displayStatus = "• " + status; upToDateCount++; } else { - displayStatus = "✗ " + status; failedCount++; } @@ -643,14 +640,14 @@ int list_packages(int argc, char* argv[]) { std::string remoteHash; if (getbin.getHash(packageName, arch, remoteHash) && !remoteHash.empty()) { if (localHash == remoteHash) { - status = "✓ Latest"; - remoteStatus = "✓"; + status = "Latest"; + remoteStatus = "OK"; } else { - status = "⚡ Update"; - remoteStatus = "⚡"; + status = "Update"; + remoteStatus = "Update"; } } else { - status = "✓ Local"; + status = "Local"; remoteStatus = "?"; } } @@ -666,14 +663,6 @@ int list_packages(int argc, char* argv[]) { // Print footer std::cout << "+" << std::string(25, '-') << "+" << std::string(12, '-') << "+" << std::string(18, '-') << "+" << std::string(10, '-') << "+" << std::endl; std::cout << std::endl; - - // Print legend - std::cout << "Legend:" << std::endl; - std::cout << " Available - Package available for installation" << std::endl; - std::cout << " ✓ Latest - Installed and up to date" << std::endl; - std::cout << " ⚡ Update - Installed but update available" << std::endl; - std::cout << " ✓ Local - Installed (remote status unknown)" << std::endl; - std::cout << std::endl; std::cout << "Total packages: " << availablePackages.size() << ", Installed: " << installedPackages.size() << std::endl; diff --git a/getpkg/test.sh b/getpkg/test.sh index 302127e..5eccebe 100755 --- a/getpkg/test.sh +++ b/getpkg/test.sh @@ -544,7 +544,7 @@ fi if [ -d ~/.config/getpkg ] && [ "$(find ~/.config/getpkg -name "*.json" -type f 2>/dev/null | wc -l)" -gt 0 ]; then echo -e "\nTest 15: Update command" UPDATE_ALL_OUTPUT=$(timeout 30 "$GETPKG" update 2>&1) || UPDATE_ALL_OUTPUT="" - if [[ "$UPDATE_ALL_OUTPUT" =~ Update\ complete ]]; then + if [[ "$UPDATE_ALL_OUTPUT" =~ Update\ Summary ]]; then print_test_result "Update all tools command" 0 else print_test_result "Update all tools command" 1