summarylogtreecommitdiffstats
path: root/fix-appstream-data.sh
diff options
context:
space:
mode:
authorDidier Richard2020-12-21 09:23:30 +0100
committerDidier Richard2020-12-21 09:23:30 +0100
commit4bee0c606a9918e425db4ad47afd19b82bcfcd74 (patch)
tree217812d44b1e5e85128e01383d02a627a1f5c9d0 /fix-appstream-data.sh
parent68e88313be37ff4bc58c4c720a087875355397e1 (diff)
downloadaur-4bee0c606a9918e425db4ad47afd19b82bcfcd74.tar.gz
V10.0.1
Add hook fix appstream
Diffstat (limited to 'fix-appstream-data.sh')
-rw-r--r--fix-appstream-data.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/fix-appstream-data.sh b/fix-appstream-data.sh
new file mode 100644
index 000000000000..e6c365c059b5
--- /dev/null
+++ b/fix-appstream-data.sh
@@ -0,0 +1,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;s|<strong>||g;s|<\/strong>||g' | gzip > "${tmp}"
+ cp "${tmp}" "${archive}"
+ rm "${tmp}"
+ echo " archive ${archive} fixed"
+ fi
+done