diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-01-14 14:45:37 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-01-14 17:33:58 +0100 |
commit | 7fa4f5e12261d39666283051956d9e1f78eb609b (patch) | |
tree | b9ae7b93fe2e0d3d0ed4d1688eec6b1e52db72ef /vendor/vendor.makefile | |
parent | 9feb98eb0aeed775f78cb4afbf6bc0e3a90e9fed (diff) |
evaluate sourceslist-list-format entity in vendors sources.list
Parsing XML entity files in shell isn't exactly nice and causing the
substitution with a while-read loop isn't either, but it seems to be
good enough for the moment without changing too much.
Thanks: Niels Thykier for reporting on IRC
Diffstat (limited to 'vendor/vendor.makefile')
-rw-r--r-- | vendor/vendor.makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vendor/vendor.makefile b/vendor/vendor.makefile index 40b35ea3d..32de3b0d5 100644 --- a/vendor/vendor.makefile +++ b/vendor/vendor.makefile @@ -8,14 +8,21 @@ include ../../buildlib/defaults.mak doc binary manpages: sources.list sources.list: sources.list.in ../../doc/apt-verbatim.ent - sed -e 's#&debian-stable-codename;#$(shell ../getinfo debian-stable-codename)#g' \ + while read line; do \ + if [ "$${line}" = '&sourceslist-list-format;' ]; then \ + $(BASE)/vendor/getinfo vendor sourceslist-list-format ; \ + else \ + echo "$${line}"; \ + fi \ + done < $< | sed -e 's#&debian-stable-codename;#$(shell ../getinfo debian-stable-codename)#g' \ -e 's#&debian-oldstable-codename;#$(shell ../getinfo debian-oldstable-codename)#g' \ -e 's#&debian-testing-codename;#$(shell ../getinfo debian-testing-codename)#g' \ -e 's#&ubuntu-codename;#$(shell ../getinfo ubuntu-codename)#g' \ -e 's#¤t-codename;#$(shell ../getinfo current-codename)#g' \ - $< > $@ + > $@ clean: clean/sources.list +veryclean: clean/sources.list clean/sources.list: rm -f sources.list |