version-check.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. # Simple script to list version numbers of critical development tools
  3. export LC_ALL=C
  4. bash --version | head -n1 | cut -d" " -f2-4
  5. MYSH=$(readlink -f /bin/sh)
  6. echo "/bin/sh -> $MYSH"
  7. echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
  8. unset MYSH
  9. echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
  10. bison --version | head -n1
  11. if [ -h /usr/bin/yacc ]; then
  12. echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
  13. elif [ -x /usr/bin/yacc ]; then
  14. echo yacc is `/usr/bin/yacc --version | head -n1`
  15. else
  16. echo "yacc not found"
  17. fi
  18. bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
  19. echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
  20. diff --version | head -n1
  21. find --version | head -n1
  22. gawk --version | head -n1
  23. if [ -h /usr/bin/awk ]; then
  24. echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
  25. elif [ -x /usr/bin/awk ]; then
  26. echo awk is `/usr/bin/awk --version | head -n1`
  27. else
  28. echo "awk not found"
  29. fi
  30. gcc --version | head -n1
  31. g++ --version | head -n1
  32. ldd --version | head -n1 | cut -d" " -f2- # glibc version
  33. grep --version | head -n1
  34. gzip --version | head -n1
  35. cat /proc/version
  36. m4 --version | head -n1
  37. make --version | head -n1
  38. patch --version | head -n1
  39. echo Perl `perl -V:version`
  40. sed --version | head -n1
  41. tar --version | head -n1
  42. makeinfo --version | head -n1
  43. xz --version | head -n1
  44. echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c
  45. if [ -x dummy ]
  46. then echo "g++ compilation OK";
  47. else echo "g++ compilation failed"; fi
  48. rm -f dummy.c dummy