crosstool-ng/scripts/showSamples.sh
Yann E. MORIN" af0f7c4d33 Correctly handle the log level overide in scripts/saveSample.sh.
Little eye candy in scripts/showSamples.sh.
2007-05-23 19:07:54 +00:00

30 lines
801 B
Bash
Executable File

#!/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"
printf " %-*s" ${width} "${sample}"
[ -f "${CT_TOP_DIR}/samples/${sample}/broken" ] && printf " (broken)"
echo
echo " \ ${CT_KERNEL}-${CT_KERNEL_VERSION} binutils-${CT_BINUTILS_VERSION}"
echo " \_ ${CT_CC}-${CT_CC_VERSION} ${CT_LIBC}-${CT_LIBC_VERSION}"
}
# 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