diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-05-08 10:57:34 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-05-08 10:57:34 +0000 |
commit | 1bfad917b6d38988b8374196c6ca1b18844cd467 (patch) | |
tree | 8c89abd615024de18574390b08a28bb306abda9b /scripts/showSamples.sh | |
parent | 095dfdceab94665eef41bc40fa9b89adacacb65a (diff) | |
download | crosstool-ng-1bfad917b6d38988b8374196c6ca1b18844cd467.tar.gz crosstool-ng-1bfad917b6d38988b8374196c6ca1b18844cd467.tar.bz2 crosstool-ng-1bfad917b6d38988b8374196c6ca1b18844cd467.zip |
Print the major components and their version when calling "make help".
Diffstat (limited to 'scripts/showSamples.sh')
-rwxr-xr-x | scripts/showSamples.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh new file mode 100755 index 00000000..ad9e32da --- /dev/null +++ b/scripts/showSamples.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Parses all samples on the command line, and for each of them, prints +# the versions of the main tools + +# GREP_OPTIONS screws things up. +export GREP_OPTIONS= + +# Dump a single sample +dump_single_sample() { + local width="$1" + local sample="$2" + . "${CT_TOP_DIR}/samples/${sample}/crosstool.config" + # Build the components string + local str="${CT_KERNEL}-${CT_KERNEL_VERSION}" + str="${str} binutils-${CT_BINUTILS_VERSION}" + str="${str} ${CT_CC}-${CT_CC_VERSION}" + str="${str} ${CT_LIBC}-${CT_LIBC_VERSION}" + printf " %-*s - %s\n" ${width} "${sample}" "${str}" +} + +# Get largest sample width +width=0 +for sample in "${@}"; do + [ ${#sample} -gt ${width} ] && width=${#sample} +done + +for sample in "${@}"; do + ( dump_single_sample ${width} "${sample}" ) +done |