2009-03-18 13:02:53 +01:00
|
|
|
#!/bin/sh
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|
2010-07-21 18:54:45 +02:00
|
|
|
. config/options $1
|
2009-03-18 13:02:53 +01:00
|
|
|
|
2010-11-19 00:18:50 +01:00
|
|
|
if [ -z $1 ]; then
|
|
|
|
|
for i in `find packages/ -type f -name meta`; do
|
|
|
|
|
GET_PKG=`grep ^PKG_NAME= $i | sed -e "s,\",,g" -e "s,PKG_NAME=,,"`
|
|
|
|
|
$SCRIPTS/get $GET_PKG
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
[ -z "$PKG_URL" ] && exit 0
|
2010-11-19 00:18:50 +01:00
|
|
|
|
2010-07-22 05:07:09 +02:00
|
|
|
if [ -n "$PKG_URL" ]; then
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
URLS="$URLS `echo $PKG_URL | sed s%GEEXBOX_SRCS%$GEEXBOX_SRCS%`"
|
2010-07-22 05:07:09 +02:00
|
|
|
|
|
|
|
|
for i in $URLS; do
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
PACKAGE="$SOURCES/$1/`basename $i`"
|
|
|
|
|
STAMP="$PACKAGE.url"
|
|
|
|
|
MD5SUM="$PACKAGE.md5"
|
|
|
|
|
|
|
|
|
|
mkdir -p $SOURCES/$1
|
|
|
|
|
|
|
|
|
|
if [ -f $STAMP ]; then
|
|
|
|
|
[ `cat $STAMP` = "$i" ] && continue
|
|
|
|
|
fi
|
|
|
|
|
DL="yes"
|
|
|
|
|
|
|
|
|
|
$SCRIPTS/checkdeps get
|
|
|
|
|
|
|
|
|
|
rm -f $STAMP
|
|
|
|
|
|
|
|
|
|
printf "%${INDENT}c GET $1\n" >&$SILENT_OUT
|
|
|
|
|
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
|
|
|
|
|
|
|
|
|
|
[ "$VERBOSE" != yes ] && WGET_OPT=-q
|
|
|
|
|
|
2009-03-18 13:02:53 +01:00
|
|
|
NBWGET=1
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
until [ -f $STAMP ] || wget --passive-ftp -c $WGET_OPT -P $SOURCES/$1 $i; do
|
2009-03-18 13:02:53 +01:00
|
|
|
NBWGET=$(($NBWGET+1))
|
|
|
|
|
if [ $NBWGET -gt 10 ]; then
|
|
|
|
|
echo -e "\nCant't get $1 sources : $i\n Try later !!"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
done
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|
|
|
|
|
echo $i > $STAMP
|
|
|
|
|
md5sum -t $PACKAGE > $MD5SUM
|
|
|
|
|
|
|
|
|
|
rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/unpack
|
|
|
|
|
rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/build
|
|
|
|
|
|
2009-03-18 13:02:53 +01:00
|
|
|
done
|
|
|
|
|
fi
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|