'Generic Commit'
Some checks failed
Build-Test-Publish / build (linux/arm64) (push) Failing after 20s
Build-Test-Publish / build (linux/amd64) (push) Failing after 39s

This commit is contained in:
Your Name 2025-06-22 12:14:48 +12:00
parent 3ab8fe87d3
commit b47d4de45e
3 changed files with 15 additions and 7 deletions

View File

@ -20,7 +20,7 @@ Install any tool from the getpkg registry:
```bash ```bash
# Install a tool # Install a tool
getpkg install ripgrep getpkg install whatsdirty
``` ```
### Managing Installed Tools ### Managing Installed Tools
@ -33,7 +33,7 @@ getpkg help
getpkg update getpkg update
# Uninstall a tool # Uninstall a tool
getpkg uninstall ripgrep getpkg uninstall whatsdirty
# Check getpkg version # Check getpkg version
getpkg version getpkg version
@ -100,7 +100,7 @@ Tools are automatically downloaded for your architecture, with fallback to unive
```bash ```bash
# Install development tools # Install development tools
getpkg ripgrep # Fast grep alternative getpkg whatsdirty # Fast grep alternative
getpkg fd # Fast find alternative getpkg fd # Fast find alternative
getpkg bat # Cat with syntax highlighting getpkg bat # Cat with syntax highlighting

View File

@ -815,7 +815,7 @@ void show_help() {
std::cout << " help Show this help message" << std::endl; std::cout << " help Show this help message" << std::endl;
std::cout << std::endl; std::cout << std::endl;
std::cout << "EXAMPLES:" << 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 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:x86_64 ./build Publish architecture-specific build" << std::endl;
std::cout << " getpkg publish myapp ./build Publish universal build" << std::endl; std::cout << " getpkg publish myapp ./build Publish universal build" << std::endl;

View File

@ -2,7 +2,7 @@
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 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" CONFIG_FILE="$HOME/.config/whatsdirty.conf"
BACKUP_FILE="" BACKUP_FILE=""
TEST_PASSED=true TEST_PASSED=true
@ -25,7 +25,12 @@ print_test() {
} }
# Function to cleanup and restore # Function to cleanup and restore
CLEANED=false
cleanup() { cleanup() {
if [ "$CLEANED" = true ]; then
return
fi
CLEANED=true
if [ -n "$BACKUP_FILE" ] && [ -f "$BACKUP_FILE" ]; then if [ -n "$BACKUP_FILE" ] && [ -f "$BACKUP_FILE" ]; then
cp "$BACKUP_FILE" "$CONFIG_FILE" cp "$BACKUP_FILE" "$CONFIG_FILE"
rm -f "$BACKUP_FILE" rm -f "$BACKUP_FILE"
@ -38,7 +43,7 @@ cleanup() {
# Set up trap to restore config on exit # Set up trap to restore config on exit
trap cleanup EXIT trap cleanup EXIT
echo "Testing whatsdirty.sh configuration behavior..." echo "Testing whatsdirty configuration behavior..."
echo "Working directory: $(pwd)" echo "Working directory: $(pwd)"
echo "Script path: $WHATSDIRTY_SCRIPT" echo "Script path: $WHATSDIRTY_SCRIPT"
echo "Config file: $CONFIG_FILE" echo "Config file: $CONFIG_FILE"
@ -148,6 +153,8 @@ else
echo " Got: $OUTPUT" echo " Got: $OUTPUT"
fi fi
cleanup
# Summary # Summary
echo echo
if [ "$TEST_PASSED" = true ]; then if [ "$TEST_PASSED" = true ]; then
@ -157,3 +164,4 @@ else
echo -e "${RED}Some tests failed!${NC}" echo -e "${RED}Some tests failed!${NC}"
exit 1 exit 1
fi fi