]> xenbits.xensource.com Git - people/larsk/security-process.git/commitdiff
Conversion scripts
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 16 Jan 2015 17:57:45 +0000 (17:57 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 16 Jan 2015 17:57:45 +0000 (17:57 +0000)
To make editing in emacs, diffing, etc, easier.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
after-edit [new file with mode: 0755]
before-edit [new file with mode: 0755]

diff --git a/after-edit b/after-edit
new file mode 100755 (executable)
index 0000000..05afaab
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+# Converts the file into something which is (hopefully) not changed by
+# the Xen Project website's canonicalisation.
+
+exec \
+perl -0 -i -pe '
+     s#\n\s+#\n#g;
+     s#\n(?!\<)# #g;
+     s# $##s;
+' security_vulnerability_process.html
diff --git a/before-edit b/before-edit
new file mode 100755 (executable)
index 0000000..3fac03d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+# Converts the file into something which is comfortable to edit in
+# Emacs, but which will be mangled by the Xen Project website's
+# canonicalisation.
+
+exec \
+emacs -q -batch \
+      security_vulnerability_process.html \
+      -f mark-whole-buffer \
+      -f indent-region \
+      -f fill-individual-paragraphs \
+      -f save-buffer