summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-05-14 15:50:11 +0200
committerMichael Schroeder <mls@suse.de>2014-05-14 15:50:11 +0200
commit982625a0b9d4b97a8074bac320c23471e1cfb1b9 (patch)
tree55ebd789ba1bed055876e3f298346a5ba9323dc2
parent08382265e737225adba8fd24e9c97e966d280b2d (diff)
downloadlibsolv-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.
-rwxr-xr-xtools/repo2solv.sh2
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=