diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-02-02 12:03:28 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-02-02 12:03:28 -0500 |
commit | 2bfa594af93cd42d5d88d848a39fcd9f1db9839b (patch) | |
tree | b3e110edf450cbfa6fc067f14a5ff5618ea875a6 /update_access_right_table.tcl | |
parent | 91c3133f29f99ebc5e5a832f6be40d76db51859c (diff) | |
download | GradeBook-2bfa594af93cd42d5d88d848a39fcd9f1db9839b.tar.gz GradeBook-2bfa594af93cd42d5d88d848a39fcd9f1db9839b.zip |
added update access rights script
Ignore-this: 6ac702687c5a80674eb7d50b7e6dc6d7
darcs-hash:20110202170328-067c0-bf3e2dc7416f85b16ae0d3e9bfcf3dde51cec154.gz
Diffstat (limited to 'update_access_right_table.tcl')
-rwxr-xr-x | update_access_right_table.tcl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/update_access_right_table.tcl b/update_access_right_table.tcl new file mode 100755 index 0000000..bc6da2c --- /dev/null +++ b/update_access_right_table.tcl @@ -0,0 +1,30 @@ +#!/bin/sh +# FILE: "/home/evmik/src/my_src/GradeBook/update_access_right_table.tcl" +# LAST MODIFICATION: "Wed, 02 Feb 2011 12:03:18 -0500 (evmik)" +# (C) 2011 by Eugeniy Mikhailov, <evgmik@gmail.com> +# $Id:$ +# vim:set ft=tcl: \ +exec tclsh "$0" "$@" + +package require sqlite3 +package require md5 +source ./GradeBook_lib.tcl + +if { $argc < 1 } { + puts {Updates access rights table according to the new library defaults.} + puts {Usage:} + puts "$argv0 database_name" + exit +} + +set dbfile [lindex $argv 0] +sqlite3 db $dbfile + +if { [catch {db eval {drop table AccessRightsTable}} errMsg ] } { + puts "The following error happened: $errMsg" +} +CreateAccessRightsTable db + +db close + +# vim: ts=2 sw=2 foldmethod=indent: |