Tobias Gasser wrote: > Am 05.01.2013 18:39, schrieb Bruce Dubbs: >> The idea of the script was that it should be short. Generally the >> problem is that the symlinks are not set and occasionally makeinfo is >> not installed. Rarely is the problem an out-of-date executable. > > agree. > > > so why not check just the very important stuff?
Try this. Note that I want the user to actually check the versions of the packages manually, not just rely on a script to do it. - -Bruce #!/bin/bash # Simple script to list version numbers of critical development tools function die { rm -f dummy.c dummy echo "Error: $1" exit 1 } export LC_ALL=C bash --version | head -n1 | cut -d" " -f2-4 SH=`readlink -f /bin/sh` echo "/bin/sh -> $SH" [ "$SH" == "/bin/bash" ] || die "/bin/sh is not a symlink to bash" echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3- bison --version | head -n1 if [ -e /usr/bin/yacc ]; then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; else die "yacc not found"; fi bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6- echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2 diff --version | head -n1 find --version | head -n1 gawk --version | head -n1 if [ -e /usr/bin/awk ]; then AWK=`readlink -f /usr/bin/awk` echo "/usr/bin/awk -> $AWK" [ "$AWK" == "/usr/bin/gawk" ] || die "/usr/bin/awk is not a symlink to gawk" else die "awk not found"; fi gcc --version | head -n1 echo 'main(){}' > dummy.c && gcc -o dummy dummy.c if [ -x dummy ] then echo "gcc compilation OK" rm -f dummy.c dummy else die "gcc compilation failed" fi ldd --version | head -n1 | cut -d" " -f2- # glibc version grep --version | head -n1 gzip --version | head -n1 cat /proc/version m4 --version | head -n1 make --version | head -n1 patch --version | head -n1 echo Perl `perl -V:version` sed --version | head -n1 tar --version | head -n1 echo "Texinfo: `makeinfo --version | head -n1`" xz --version | head -n1 echo -e "\n\n*** Review all versions for currency!" -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page