[SM-Commit] GIT changes to master guru-tools by Jaka Kranjc (6407ab72dea0f8652b4b95303e0935258a574fdb)

Jaka Kranjc scm at sourcemage.org
Fri Jan 23 11:45:12 EST 2009


GIT changes to master guru-tools by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:

 creator_count.sh |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+)

New commits:
commit 6407ab72dea0f8652b4b95303e0935258a574fdb
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    creator_count.sh: added a modified script for bug #10363
    
    Lists all spells created by author(s)

diff --git a/creator_count.sh b/creator_count.sh
new file mode 100755
index 0000000..7bb3c72
--- /dev/null
+++ b/creator_count.sh
@@ -0,0 +1,31 @@
+#---------------------------------------------------------------------
+##
+## Lists all spells created by author(s)
+## @param author (any part of the HISTORY title header; case insensitive)
+## @param author (optional)
+## @param ...
+##
+#---------------------------------------------------------------------
+. /etc/sorcery/config 
+
+function show_creator()  {
+  local spell spells
+
+  spells=$(
+    for spell in $(codex_get_all_spells); do
+      if [[ -e $spell/HISTORY ]]; then
+        tac $spell/HISTORY | grep -m1 -E "^(199|20)" | grep -iq "$1" &&
+        echo ${spell##*/}
+      fi
+    done
+  )
+  message "$spells" | column
+  local count=$(wc -l <<< "$spells")
+  message "Total: $count"
+}
+
+for i in "$@"; do
+  message "Spells created by $i:"
+  show_creator "$i"
+  message
+done



More information about the SM-Commit mailing list