[OpenWrt-Devel] [PATCH V3 2/2] script/feeds: add a new command that allows generating a new feeds.conf
Petr Štetiar
ynezz at true.cz
Wed Jun 5 06:45:49 EDT 2019
John Crispin <john at phrozen.org> [2019-06-05 12:30:57]:
> On 05/06/2019 12:17, Karl Palsson wrote:
> > It seems like a lot of perl for a narrow usecase.
It seems like a good starting point, but it makes me wonder who is going to
touch this afterwards due to the Perl :-)
> This was brought up as a missing feature by the prpl folks. I considered on
> how to best implement this and find that having proper tooling is much
> better than having to carry around an extra file that is cat. being able to
> build the feeds.conf dynamically like this just seems much cleaner to me and
> will allow downstream users, vendors, odms and integrators to have less need
> to patch their trees to death.
BTW been using following for ages:
cat scripts/update-feeds.sh
#!/bin/bash
for feed in $(ls -1 feeds | grep -v '\.'); do
pushd feeds/$feed > /dev/null
remote=$(git ls-remote --get-url)
comment=$(git log -1 --pretty=format:"%h: %s")
url=$(git log -1 --pretty=format:"src-git $feed ${remote}^%h")
popd > /dev/null
echo "# $comment" >> feeds.conf
echo $url >> feeds.conf
done
producing following:
# 21b29f3faf8b: Merge pull request #2513 from musashino205/l10n/base-upd-ja
src-git luci git://git.openwrt.org/project/luci.git^21b29f3faf8b
# e4ab7b4fec30: znc: fix patches applying
src-git packages https://github.com/openwrt/packages.git^e4ab7b4fec30
Planned to convert it into make target one day...
-- ynezz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list