]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
scripts/convert_to_utf8: add script to help with this.
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 May 2018 07:34:23 +0000 (09:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 May 2018 07:34:23 +0000 (09:34 +0200)
scripts/convert_to_utf8 [new file with mode: 0755]

diff --git a/scripts/convert_to_utf8 b/scripts/convert_to_utf8
new file mode 100755 (executable)
index 0000000..03b1a95
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+for file in $(ls *.patch); do
+       ISO=$(file "${file}" | grep ISO)
+       if [ "${ISO}" != "" ] ; then
+               echo "Converting ${file}"
+               tmpfile=$(mktemp convert-XXXXX || exit 1)
+               iconv -c --to-code=UTF-8//TRANSLIT "${file}" > "${tmpfile}"
+               mv "${tmpfile}" "${file}"
+       fi
+done
+