script to find new perms from permacrud that are not in the permission seed data yet
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 May 2008 18:17:07 +0000 (18:17 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 May 2008 18:17:07 +0000 (18:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9642 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/reconcile-perms.sh [new file with mode: 0755]

diff --git a/Open-ILS/src/extras/reconcile-perms.sh b/Open-ILS/src/extras/reconcile-perms.sh
new file mode 100755 (executable)
index 0000000..27764f9
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+pushd . >/dev/null 2>/dev/null
+cd `dirname $0`
+
+xsltproc ../../examples/extract-IDL-permissions.xsl ../../examples/fm_IDL.xml|perl -e 'while(<>){s/^\s+(.*)\s+$/$1/o;print("$1\n")unless(/^\s*$/ || /\s+/)}'|sort -u > /tmp/oils_permacrud_perm_list
+grep -A1 perm_list ../sql/Pg/950.data.seed-values.sql|grep "'"|cut -f2 -d"'"|sort -u > /tmp/oils_sql_perm_list
+
+echo "New permissions from permacrud:"
+echo
+
+diff -pu /tmp/oils_sql_perm_list /tmp/oils_permacrud_perm_list |grep '^+'|cut -f2 -d'+'|grep -v '^$'
+
+echo
+
+popd >/dev/null 2>/dev/null
+
+