summarylogtreecommitdiffstats
path: root/fix-appstream-data.sh
blob: 6b0ed4fa9fd8a15cfa369f680caa53488eb637a8 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
tmp="/tmp/fix-appstream-data"
while read -r archive; do
        if [[ $(zcat "${archive}" | grep -cm1 '<em>') == "1" ]]; then
            zcat "${archive}"  | sed 's|<em>||g;s|<\/em>||g;' | sed 's|<code>||g;s|<\/code>||g;'| gzip > "${tmp}"
            cp "${tmp}" "${archive}"
            rm "${tmp}"
            echo "      archive ${archive} fixed"
        fi
done