clfs-bootstrap

clfs-bootstrap.git
git clone git://git.lenczewski.org/clfs-bootstrap.git
Log | Files | Refs | README | LICENSE

host-check.sh (1715B)


      1 #!/bin/bash
      2 
      3 # Simple script to list version numbers of critical development tools
      4 set -e
      5 export LC_ALL=C
      6 
      7 
      8 bash --version | head -n1 | cut -d" " -f2-4
      9 echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
     10 
     11 
     12 echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
     13 ## compression / decomression
     14 tar --version | head -n1
     15 bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
     16 gzip --version | head -n1
     17 xz --version | head -n1
     18 
     19 
     20 sudo -V | head -n1
     21 find --version | head -n1
     22 
     23 
     24 ## stream processing
     25 sed --version | head -n1
     26 gawk --version | head -n1
     27 if [ -h /usr/bin/awk ]; then
     28 	echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
     29 elif [ -x /usr/bin/awk ]; then
     30 	echo awk is `/usr/bin/awk --version | head -n1`
     31 else
     32 	echo "awk not found"
     33 fi
     34 
     35 
     36 ## gcc and friends
     37 gcc --version | head -n1
     38 g++ --version | head -n1
     39 ldd --version | head -n1 | cut -d" " -f2-  # glibc version
     40 echo "#include <ncurses.h>" | gcc -E - > /dev/null
     41 
     42 
     43 ## additional building dependencies
     44 bc --version | head -n1
     45 m4 --version | head -n1
     46 make --version | head -n1
     47 patch --version | head -n1
     48 diff --version | head -n1
     49 makeinfo --version | head -n1  # texinfo version
     50 bison --version | head -n1
     51 if [ -h /usr/bin/yacc ]; then
     52         echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
     53 elif [ -x /usr/bin/yacc ]; then
     54         echo yacc is `/usr/bin/yacc --version | head -n1`
     55 else
     56         echo "yacc not found"
     57 fi
     58 
     59 
     60 ## gcc test (can it build the minimal program)
     61 echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c
     62 if [ -x dummy ]; then
     63 	echo "g++ compilation OK";
     64 else
     65 	echo "g++ compilation failed";
     66 fi
     67 rm -f dummy.c dummy
     68 
     69 
     70 ## linux system version
     71 cat /proc/version
     72 
     73 
     74 echo "Finished checking host system capabilities!"
     75