diff options
author | Michael Schroeder <mls@suse.de> | 2014-05-14 15:50:11 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-05-14 15:50:11 +0200 |
commit | 982625a0b9d4b97a8074bac320c23471e1cfb1b9 (patch) | |
tree | 55ebd789ba1bed055876e3f298346a5ba9323dc2 /tools | |
parent | 08382265e737225adba8fd24e9c97e966d280b2d (diff) | |
download | libsolv-982625a0b9d4b97a8074bac320c23471e1cfb1b9.tar.gz libsolv-982625a0b9d4b97a8074bac320c23471e1cfb1b9.tar.bz2 libsolv-982625a0b9d4b97a8074bac320c23471e1cfb1b9.zip |
use sed instead of grep to get rid of the <?xml...> line
This allows us to parse files with no newlines.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/repo2solv.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh index 4b595e8..215b1bc 100755 --- a/tools/repo2solv.sh +++ b/tools/repo2solv.sh @@ -148,7 +148,7 @@ if test "$repotype" = rpmmd ; then repomd_decompress "$susedataxml" fi echo '</rpmmd>' - ) | grep -v '<?xml' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4 + ) | sed 's/<?xml[^>]*>//' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4 fi prodfile= |