Simplify build script directory validation

- Replace file-based validation with directory name check
- Now simply checks if current directory is named 'nostr_core_lib'
- More reliable and clearer error messages for customers
- Fixes issue where customers get validation errors when running from properly named directories
This commit is contained in:
Laan Tungir 2025-08-16 09:45:27 -04:00
parent 05fe1df8aa
commit 00df0cad99
1 changed files with 5 additions and 2 deletions

View File

@ -148,10 +148,13 @@ fi
print_info "NOSTR Core Library - Customer Build Script"
# Check if we're running from the correct directory
if [ ! -d "nostr_core" ] || [ ! -f "nostr_core/utils.c" ] || [ ! -d "secp256k1" ]; then
CURRENT_DIR=$(basename "$(pwd)")
if [ "$CURRENT_DIR" != "nostr_core_lib" ]; then
print_error "Build script must be run from the nostr_core_lib directory"
echo ""
echo "It looks like you're trying to run this script from your project directory."
echo "Current directory: $CURRENT_DIR"
echo "Expected directory: nostr_core_lib"
echo ""
echo "Please change to the nostr_core_lib directory first, then run the build script."
echo ""
echo "Correct usage:"