]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
use sed instead of grep to get rid of the <?xml...> line
authorMichael Schroeder <mls@suse.de>
Thu, 15 May 2014 09:43:43 +0000 (11:43 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 15 May 2014 09:43:43 +0000 (11:43 +0200)
This allows us to parse files with no newlines.

tools/repo2solv.sh

index 3f24e17e5e23d453ac7f521862625be4af27182b..6dbc0b221d3871dcb1b11526512de2c6d40c897c 100755 (executable)
@@ -130,7 +130,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[^>]*>//g' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4
   fi
 
   prodfile=