You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

112 lines
3.1 KiB

#!/bin/bash
# Environment Verification Script for Test Apps
echo "🔍 Verifying Test Apps Environment..."
echo ""
# Check Node.js
echo "📦 Node.js:"
if command -v node &> /dev/null; then
node_version=$(node --version)
echo " ✅ Installed: $node_version"
# Check if version is 18+
major_version=$(echo $node_version | cut -d'.' -f1 | sed 's/v//')
if [ "$major_version" -ge 18 ]; then
echo " ✅ Version 18+ (compatible)"
else
echo " ⚠️ Version $major_version (requires 18+)"
fi
else
echo " ❌ Not installed"
fi
# Check npm
echo ""
echo "📦 npm:"
if command -v npm &> /dev/null; then
npm_version=$(npm --version)
echo " ✅ Installed: $npm_version"
else
echo " ❌ Not installed"
fi
# Check Capacitor CLI
echo ""
echo "⚡ Capacitor CLI:"
if command -v cap &> /dev/null; then
cap_version=$(cap --version)
echo " ✅ Installed: $cap_version"
else
echo " ❌ Not installed (will be installed by setup scripts)"
fi
# Check Android (if available)
echo ""
echo "📱 Android:"
if command -v studio &> /dev/null; then
echo " ✅ Android Studio installed"
else
echo " ❌ Android Studio not found"
fi
if [ ! -z "$ANDROID_HOME" ]; then
echo " ✅ ANDROID_HOME set: $ANDROID_HOME"
else
echo " ❌ ANDROID_HOME not set"
fi
if command -v java &> /dev/null; then
java_version=$(java -version 2>&1 | head -n 1)
echo " ✅ Java: $java_version"
else
echo " ❌ Java not found"
fi
# Check iOS (if on macOS)
echo ""
echo "🍎 iOS:"
if [[ "$OSTYPE" == "darwin"* ]]; then
if command -v xcodebuild &> /dev/null; then
xcode_version=$(xcodebuild -version | head -n 1)
echo " ✅ Xcode: $xcode_version"
else
echo " ❌ Xcode not installed"
fi
if command -v xcrun &> /dev/null; then
echo " ✅ Xcode Command Line Tools available"
else
echo " ❌ Xcode Command Line Tools not installed"
fi
else
echo " ⚠️ iOS development requires macOS"
fi
# Check Electron
echo ""
echo "⚡ Electron:"
if command -v npx &> /dev/null; then
electron_version=$(npx electron --version 2>/dev/null)
if [ $? -eq 0 ]; then
echo " ✅ Electron available: $electron_version"
else
echo " ⚠️ Electron not installed (will be installed by setup)"
fi
else
echo " ❌ npx not available"
fi
echo ""
echo "📋 Summary:"
echo " - Node.js 18+: $(command -v node &> /dev/null && node --version | cut -d'.' -f1 | sed 's/v//' | awk '{if($1>=18) print "✅"; else print "❌"}' || echo "❌")"
echo " - npm: $(command -v npm &> /dev/null && echo "✅" || echo "❌")"
echo " - Android Studio: $(command -v studio &> /dev/null && echo "✅" || echo "❌")"
echo " - Xcode: $(command -v xcodebuild &> /dev/null && echo "✅" || echo "❌")"
echo " - Electron: $(command -v npx &> /dev/null && npx electron --version &> /dev/null && echo "✅" || echo "❌")"
echo ""
echo "🚀 Next Steps:"
echo " 1. Install missing prerequisites"
echo " 2. Run setup scripts: ./setup-*.sh"
echo " 3. See SETUP_GUIDE.md for detailed instructions"