1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/scripts/showSamples.sh Sun May 20 16:18:40 2007 +0000
1.3 @@ -0,0 +1,30 @@
1.4 +#!/bin/bash
1.5 +
1.6 +# Parses all samples on the command line, and for each of them, prints
1.7 +# the versions of the main tools
1.8 +
1.9 +# GREP_OPTIONS screws things up.
1.10 +export GREP_OPTIONS=
1.11 +
1.12 +# Dump a single sample
1.13 +dump_single_sample() {
1.14 + local width="$1"
1.15 + local sample="$2"
1.16 + . "${CT_TOP_DIR}/samples/${sample}/crosstool.config"
1.17 + # Build the components string
1.18 + local str="${CT_KERNEL}-${CT_KERNEL_VERSION}"
1.19 + str="${str} binutils-${CT_BINUTILS_VERSION}"
1.20 + str="${str} ${CT_CC}-${CT_CC_VERSION}"
1.21 + str="${str} ${CT_LIBC}-${CT_LIBC_VERSION}"
1.22 + printf " %-*s - %s\n" ${width} "${sample}" "${str}"
1.23 +}
1.24 +
1.25 +# Get largest sample width
1.26 +width=0
1.27 +for sample in "${@}"; do
1.28 + [ ${#sample} -gt ${width} ] && width=${#sample}
1.29 +done
1.30 +
1.31 +for sample in "${@}"; do
1.32 + ( dump_single_sample ${width} "${sample}" )
1.33 +done