Simplify downloading sstrip, using the common retrieval framework.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 24 06:46:40 2008 +0000 (2008-07-24)
changeset 713e074abc50374
parent 712 32ad25a4765e
child 714 0b87d31c0f49
Simplify downloading sstrip, using the common retrieval framework.

/trunk/scripts/build/tools/200-sstrip.sh | 31 3 28 0 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
scripts/build/tools/200-sstrip.sh
     1.1 --- a/scripts/build/tools/200-sstrip.sh	Thu Jul 24 06:42:29 2008 +0000
     1.2 +++ b/scripts/build/tools/200-sstrip.sh	Thu Jul 24 06:46:40 2008 +0000
     1.3 @@ -32,38 +32,13 @@
     1.4  
     1.5      buildroot)
     1.6          CT_HasOrAbort lynx
     1.7 -        sstrip_url='http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/sstrip/sstrip.c'
     1.8          do_print_filename() {
     1.9              echo "sstrip.c"
    1.10          }
    1.11          do_tools_sstrip_get() {
    1.12 -            # With this one, we must handle the download by ourselves,
    1.13 -            # we can't leave the job to the classic CT_GetFile.
    1.14 -            if [ -f "${CT_TARBALLS_DIR}/sstrip.c" ]; then
    1.15 -                return 0
    1.16 -            fi
    1.17 -            if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then
    1.18 -                CT_DoLog EXTRA "Using 'sstrip' from local storage"
    1.19 -                ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c"  \
    1.20 -                       "${CT_TARBALLS_DIR}/sstrip.c"        2>&1 |CT_DoLog ALL
    1.21 -                return 0
    1.22 -            fi
    1.23 -            CT_Pushd "${CT_TARBALLS_DIR}"
    1.24 -            CT_DoLog EXTRA "Retrieving 'sstrip' from network"
    1.25 -            http_data=$(lynx -dump "${sstrip_url}")
    1.26 -            link=$(echo -en "${http_data}"                          \
    1.27 -                  |egrep '\[[[:digit:]]+\]download'                 \
    1.28 -                  |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;')
    1.29 -            rev_url=$(echo -en "${http_data}"                       \
    1.30 -                     |egrep '^ *8\.'                                \
    1.31 -                     |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;')
    1.32 -            CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL
    1.33 -            mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG
    1.34 -            if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
    1.35 -                CT_DoLog EXTRA "Saving 'sstrip.c' to local storage"
    1.36 -                CT_DoExecLog ALL cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}"
    1.37 -            fi
    1.38 -            CT_Popd
    1.39 +            # Note: the space between sstrip and .c is on purpose.
    1.40 +            CT_GetFile sstrip .c    \
    1.41 +                       "http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
    1.42          }
    1.43          do_tools_sstrip_extract() {
    1.44              # We'll let buildroot guys take care of sstrip maintenance and patching.