sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master guru-tools by Jaka Kranjc (90de52b58c9fdc4e6cdd8e9cb17260801b2af337)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master guru-tools by Jaka Kranjc (90de52b58c9fdc4e6cdd8e9cb17260801b2af337)
- Date: Fri, 23 Jan 2009 11:43:19 -0600
GIT changes to master guru-tools by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
checkOldSpells.sh | 17 +++++++++++++++++
1 files changed, 17 insertions(+)
New commits:
commit 90de52b58c9fdc4e6cdd8e9cb17260801b2af337
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
checkOldSpells.sh:
searches for spells that have not been updated in $1 years
(based on history entries)
an easy way to find bitrot or overdue updates
diff --git a/checkOldSpells.sh b/checkOldSpells.sh
new file mode 100755
index 0000000..ad64247
--- /dev/null
+++ b/checkOldSpells.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# searches for spells that have not been updated in $1 years
+# (based on history entries)
+
+ref_date=$(date -d "${1:-1} year ago" +%F)
+codex=${2:-/var/lib/sorcery/codex}
+
+for spell in $(find $codex -name HISTORY)
+do
+ [[ -s $spell ]] || continue # empty file
+ spell_date=$(sed -n '/^20/{ s, .*$,,p;q}' $spell)
+ if [[ $ref_date > $spell_date ]]
+ then
+ echo "$(basename $(dirname $spell)) was last updated before $ref_date
($spell_date)"
+ fi
+done
- [SM-Commit] GIT changes to master guru-tools by Jaka Kranjc (90de52b58c9fdc4e6cdd8e9cb17260801b2af337), Jaka Kranjc, 01/23/2009
Archive powered by MHonArc 2.6.24.