mvp-factory-openhands/test-scripts/check_environment.sh

31 lines
917 B
Bash

#!/bin/bash
echo "=== Checking available build tools ==="
# Check for common build tools
tools=("node" "npm" "yarn" "python3" "pip" "pip3" "java" "javac" "mvn" "gradle" "go" "make" "cargo" "docker")
for tool in "${tools[@]}"; do
if command -v "$tool" &> /dev/null; then
version=$($tool --version 2>&1 | head -n 1)
echo "$tool: $version"
else
echo "$tool: not available"
fi
done
echo -e "\n=== Current directory contents ==="
ls -la
echo -e "\n=== Looking for hidden files ==="
ls -la .* 2>/dev/null || echo "No hidden files or permission denied"
echo -e "\n=== Git information ==="
if [ -d ".git" ]; then
echo "Git repository found!"
git status 2>/dev/null || echo "Cannot read git status"
git log --oneline -1 2>/dev/null || echo "Cannot read git log"
git branch 2>/dev/null || echo "Cannot read git branch"
else
echo "No git repository found"
fi