2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # Usage : $1 -> source feeds, space separated
8 # $2 -> other options (not used yet)
10 # Note : we do not yet resolve package name conflicts
14 FEEDS_DIR
=$TOPDIR/feeds
15 PACKAGE_DIR
=$TOPDIR/package
17 # We work in the TOPDIR as defined in the caller Makefile
19 # This directory will be structured this way : feeds/feed-name
20 [ -d $FEEDS_DIR ] || mkdir
-p $FEEDS_DIR
23 # Some functions we might call several times a run
25 find $1 -type l |
xargs -r rm -f
29 # We assume that feeds do reproduce the hierarchy : section/package
30 # so that we can make this structure be flat in $PACKAGE_DIR
38 # We ensure the feed has not already been checked out, if so, we just update the source feed
39 if [ -d $FEEDS_DIR/$2 ]; then
40 svn up
${3:+-r$3} $FEEDS_DIR/$2
41 echo "Updated to revision $(LANG=C svn info $FEEDS_DIR/$2 | awk '/^Revision:/ { print $2 }' )";
42 # Otherwise, we have to checkout in the $FEEDS_DIR
44 svn co
${3:+-r$3} $1 $FEEDS_DIR/$2
45 echo "Checked out revision $(LANG=C svn info $FEEDS_DIR/$2 | awk '/^Revision:/ { print $2 }' )";
50 # We extract the last name of the URL, maybe we should rename this as domain.tld.repository.name
51 echo "$(echo $1 | sed -e "s
/[^A-Za-z\.
]\
+/_
/g
")"
54 # We can delete symlinks every time we start this script, since modifications have been made in the $FEEDS_DIR anyway
55 delete_symlinks
"$PACKAGE_DIR"
56 # Now let's checkout feeds
59 name
=$
(extract_feed_name
"$feed")
60 checkout_feed
"$feed" "$name" "$2"
62 # Finally setup symlinks
63 setup_symlinks
"$FEEDS_DIR" "$PACKAGE_DIR"
This page took 0.043697 seconds and 5 git commands to generate.