scripts/showSamples.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 03 17:51:16 2008 +0000 (2008-05-03)
changeset 486 92f6149c4275
parent 182 223c84ec2d90
child 539 c538627f69f1
permissions -rwxr-xr-x
Some people are reposrting that ftp does not work on their network, probably due to proxies, while http does work.
Some (most) of the sites we use toretrieve tarballs have http equivallent for the ftp service. Use http as a failover.
There's no solution for those sites that do not have such an http equivalent.

/trunk/scripts/build/binutils.sh | 5 2 3 0 ++---
/trunk/scripts/build/libc_glibc.sh | 4 2 2 0 ++--
/trunk/scripts/build/libc_uClibc.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 8 3 5 0 +++-----
/trunk/scripts/build/kernel_linux.sh | 7 2 5 0 ++-----
/trunk/scripts/build/cc_gcc.sh | 6 2 4 0 ++----
/trunk/scripts/build/gmp.sh | 4 1 3 0 +---
8 files changed, 14 insertions(+), 24 deletions(-)
     1 #!/bin/bash
     2 
     3 # Parses all samples on the command line, and for each of them, prints
     4 # the versions of the main tools
     5 
     6 opt="$1"
     7 [ "${opt}" = "-v" ] && shift || opt=
     8 
     9 # GREP_OPTIONS screws things up.
    10 export GREP_OPTIONS=
    11 
    12 # Dump a single sample
    13 dump_single_sample() {
    14     local verbose=0
    15     [ "$1" = "-v" ] && verbose=1 && shift
    16     local width="$1"
    17     local sample="$2"
    18     if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
    19         sample_top="${CT_TOP_DIR}"
    20         sample_type="local"
    21     else
    22         sample_top="${CT_LIB_DIR}"
    23         sample_type="global"
    24     fi
    25     printf "  %-*s  (%s" ${width} "${sample}" "${sample_type}"
    26     [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
    27     echo ")"
    28     if [ ${verbose} -ne 0 ]; then
    29         . "${sample_top}/samples/${sample}/crosstool.config"
    30         echo    "    OS        : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
    31         echo    "    binutils  : binutils-${CT_BINUTILS_VERSION}"
    32         echo -n "    C compiler: ${CT_CC}-${CT_CC_VERSION} (C"
    33         [ "${CT_CC_LANG_CXX}" = "y"     ] && echo -n ",C++"
    34         [ "${CT_CC_LANG_FORTRAN}" = "y" ] && echo -n ",Fortran"
    35         [ "${CT_CC_LANG_JAVA}" = "y"    ] && echo -n ",Java"
    36         [ "${CT_CC_LANG_ADA}" = "y"     ] && echo -n ",ADA"
    37         [ "${CT_CC_LANG_OBJC}" = "y"    ] && echo -n ",Objective-C"
    38         [ "${CT_CC_LANG_OBJCXX}" = "y"  ] && echo -n ",Objective-C++"
    39         [ -n "${CT_CC_LANG_OTHERS}"     ] && echo -n ",$CT_CC_LANG_OTHERS}"
    40         echo    ")"
    41         echo    "    C library : ${CT_LIBC}-${CT_LIBC_VERSION}"
    42         echo -n "    Tools     :"
    43         [ "${CT_LIBELF}"  ] && echo -n " libelf-${CT_LIBELF_VERSION}"
    44         [ "${CT_SSTRIP}"  ] && echo -n " sstrip"
    45         [ "${CT_DMALLOC}" ] && echo -n " dmalloc-${CT_DMALLOC_VERSION}"
    46         [ "${CT_DUMA}"    ] && echo -n " duma-${CT_DUMA_VERSION}"
    47         [ "${CT_GDB}"     ] && echo -n " gdb-${CT_GDB_VERSION}"
    48         [ "${CT_LTRACE}"  ] && echo -n " ltrace-${CT_LTRACE_VERSION}"
    49         [ "${CT_STRACE}"  ] && echo -n " strace-${CT_STRACE_VERSION}"
    50         echo
    51         echo
    52     fi
    53 }
    54 
    55 # Get largest sample width
    56 width=0
    57 for sample in "${@}"; do
    58     [ ${#sample} -gt ${width} ] && width=${#sample}
    59 done
    60 
    61 for sample in "${@}"; do
    62     ( dump_single_sample ${opt} ${width} "${sample}" )
    63 done