summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-24 06:46:40 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-24 06:46:40 (GMT)
commit17693c9c9889aa7754186998ec54e3fd4e27bdfd (patch)
treeb4fc632b3622d781d95d903e6abf2b80a85e30f5 /scripts
parentadc71fffcc4f9ba8c4544f208bbf569f93546940 (diff)
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(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/tools/200-sstrip.sh31
1 files changed, 3 insertions, 28 deletions
diff --git a/scripts/build/tools/200-sstrip.sh b/scripts/build/tools/200-sstrip.sh
index 16a1349..642334b 100644
--- a/scripts/build/tools/200-sstrip.sh
+++ b/scripts/build/tools/200-sstrip.sh
@@ -32,38 +32,13 @@ case "${CT_SSTRIP_FROM}" in
buildroot)
CT_HasOrAbort lynx
- sstrip_url='http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/sstrip/sstrip.c'
do_print_filename() {
echo "sstrip.c"
}
do_tools_sstrip_get() {
- # With this one, we must handle the download by ourselves,
- # we can't leave the job to the classic CT_GetFile.
- if [ -f "${CT_TARBALLS_DIR}/sstrip.c" ]; then
- return 0
- fi
- if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then
- CT_DoLog EXTRA "Using 'sstrip' from local storage"
- ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" \
- "${CT_TARBALLS_DIR}/sstrip.c" 2>&1 |CT_DoLog ALL
- return 0
- fi
- CT_Pushd "${CT_TARBALLS_DIR}"
- CT_DoLog EXTRA "Retrieving 'sstrip' from network"
- http_data=$(lynx -dump "${sstrip_url}")
- link=$(echo -en "${http_data}" \
- |egrep '\[[[:digit:]]+\]download' \
- |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;')
- rev_url=$(echo -en "${http_data}" \
- |egrep '^ *8\.' \
- |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;')
- CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL
- mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG
- if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
- CT_DoLog EXTRA "Saving 'sstrip.c' to local storage"
- CT_DoExecLog ALL cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}"
- fi
- CT_Popd
+ # Note: the space between sstrip and .c is on purpose.
+ CT_GetFile sstrip .c \
+ "http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
}
do_tools_sstrip_extract() {
# We'll let buildroot guys take care of sstrip maintenance and patching.