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/getinfo | |
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/getinfo')
-rwxr-xr-x | vendor/getinfo | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/getinfo b/vendor/getinfo index 415ede98c..79da83620 100755 --- a/vendor/getinfo +++ b/vendor/getinfo @@ -11,7 +11,7 @@ if [ -z "$INFO" ] || [ ! -e "$INFO" ]; then fi getrawfield() { - grep --max-count=1 "^<!ENTITY $1 \"" "${2:-$INFO}" | cut -d'"' -f 2 + awk "/<!ENTITY $1/ {f=NR} f && NR-1==f { print; exit 0 }" RS='"' "${2:-$INFO}" } getfield() { |