scripts/showSamples.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Apr 18 22:16:28 2008 +0000 (2008-04-18)
changeset 451 8a72f9bcf675
parent 168 45811aef4097
child 474 2904d77fe117
permissions -rwxr-xr-x
Using SOCKS 4/5 proxy is no easy task:
- a machine may well be able to reach the proxy, even if it is not on the same sub-net(s) as the machine itself (absolutely legitimate)
- tsocks.conf needs a list of so-called 'local' networks that can be reached without the need for a SOCKS connection
- SOCKS proxies are expected to be in 'local' networks
- there is absolutely NO way to tell what networks are local, besides the sub-net(s) the machine is in

Therefore, appropriate configuration of SOCKS 4/5 configuration is really complex, and attempts to correctly overcome this issue are doomed.

/trunk/scripts/crosstool.sh | 52 46 6 0 ++++++++++++++++++++++++++++++++++----
/trunk/config/global/download_extract.in | 39 31 8 0 +++++++++++++++++++++++------
2 files changed, 77 insertions(+), 14 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 # GREP_OPTIONS screws things up.
     7 export GREP_OPTIONS=
     8 
     9 # Dump a single sample
    10 dump_single_sample() {
    11     local width="$1"
    12     local sample="$2"
    13     if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
    14         sample_top="${CT_TOP_DIR}"
    15         sample_type="local"
    16     else
    17         sample_top="${CT_LIB_DIR}"
    18         sample_type="global"
    19     fi
    20     printf "  %-*s  (%s" ${width} "${sample}" "${sample_type}"
    21     [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
    22     echo ")"
    23 }
    24 
    25 # Get largest sample width
    26 width=0
    27 for sample in "${@}"; do
    28     [ ${#sample} -gt ${width} ] && width=${#sample}
    29 done
    30 
    31 for sample in "${@}"; do
    32     ( dump_single_sample ${width} "${sample}" )
    33 done