whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: ToC Comments: - fix wrapping
Date Sun, 06 Jan 2019 13:00:10 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new b8a212a  ToC Comments: - fix wrapping
b8a212a is described below

commit b8a212add217527764fa31c01d71e6925fe7aab4
Author: Sebb <sebb@apache.org>
AuthorDate: Sun Jan 6 13:00:09 2019 +0000

    ToC Comments: - fix wrapping
---
 tools/toccomments.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/toccomments.sh b/tools/toccomments.sh
new file mode 100755
index 0000000..80f1d2b
--- /dev/null
+++ b/tools/toccomments.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+# Fix incorrectly wrapped comments in Incubator ToC section
+
+# Look for Comments: preceeded by non-space
+ruby -p -i.orig -e 'gsub(/(\S)\s+(Comments:)/,"\\1\n     \\2")' "$@"
+for i in "$@"
+do
+  # if the files are the same, drop the unchanged output
+  if cmp -s $i $i.orig
+  then
+      echo "$i has not changed"
+      rm $i.orig
+  else
+      echo "$i has changed"
+#       ls -l $i*
+  fi
+done


Mime
View raw message