diff --git a/README.md b/README.md index dd1c93d..ddc72fe 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Install any tool from the getpkg registry: ```bash # Install a tool -getpkg install ripgrep +getpkg install whatsdirty ``` ### Managing Installed Tools @@ -33,7 +33,7 @@ getpkg help getpkg update # Uninstall a tool -getpkg uninstall ripgrep +getpkg uninstall whatsdirty # Check getpkg version getpkg version @@ -100,7 +100,7 @@ Tools are automatically downloaded for your architecture, with fallback to unive ```bash # Install development tools -getpkg ripgrep # Fast grep alternative +getpkg whatsdirty # Fast grep alternative getpkg fd # Fast find alternative getpkg bat # Cat with syntax highlighting diff --git a/getpkg/src/main.cpp b/getpkg/src/main.cpp index df3af0b..ae012e1 100644 --- a/getpkg/src/main.cpp +++ b/getpkg/src/main.cpp @@ -815,7 +815,7 @@ void show_help() { std::cout << " help Show this help message" << std::endl; std::cout << std::endl; std::cout << "EXAMPLES:" << std::endl; - std::cout << " getpkg install ripgrep Install ripgrep tool" << std::endl; + std::cout << " getpkg install whatsdirty Install whatsdirty tool" << std::endl; std::cout << " getpkg install myapp Install myapp" << std::endl; std::cout << " getpkg publish myapp:x86_64 ./build Publish architecture-specific build" << std::endl; std::cout << " getpkg publish myapp ./build Publish universal build" << std::endl; diff --git a/whatsdirty/test.sh b/whatsdirty/test.sh index 632a45e..bb119ab 100755 --- a/whatsdirty/test.sh +++ b/whatsdirty/test.sh @@ -2,7 +2,7 @@ set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -WHATSDIRTY_SCRIPT="$SCRIPT_DIR/whatsdirty.sh" +WHATSDIRTY_SCRIPT="$SCRIPT_DIR/whatsdirty" CONFIG_FILE="$HOME/.config/whatsdirty.conf" BACKUP_FILE="" TEST_PASSED=true @@ -25,7 +25,12 @@ print_test() { } # Function to cleanup and restore +CLEANED=false cleanup() { + if [ "$CLEANED" = true ]; then + return + fi + CLEANED=true if [ -n "$BACKUP_FILE" ] && [ -f "$BACKUP_FILE" ]; then cp "$BACKUP_FILE" "$CONFIG_FILE" rm -f "$BACKUP_FILE" @@ -38,7 +43,7 @@ cleanup() { # Set up trap to restore config on exit trap cleanup EXIT -echo "Testing whatsdirty.sh configuration behavior..." +echo "Testing whatsdirty configuration behavior..." echo "Working directory: $(pwd)" echo "Script path: $WHATSDIRTY_SCRIPT" echo "Config file: $CONFIG_FILE" @@ -148,6 +153,8 @@ else echo " Got: $OUTPUT" fi +cleanup + # Summary echo if [ "$TEST_PASSED" = true ]; then @@ -156,4 +163,5 @@ if [ "$TEST_PASSED" = true ]; then else echo -e "${RED}Some tests failed!${NC}" exit 1 -fi \ No newline at end of file +fi +