source: trunk/mkdictindex.tcl @ 804

Last change on this file since 804 was 804, checked in by toby, 11 years ago

# on 2004/09/20 15:31:47, toby did:
add "package require Tk" for starkit use

  • Property rcs:author set to toby
  • Property rcs:date set to 2004/09/20 15:31:47
  • Property rcs:lines set to +1 -0
  • Property rcs:rev set to 1.2
  • Property rcs:state set to Exp
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Revision Id
File size: 1.5 KB
Line 
1#!/bin/sh
2# the next line restarts this script using wish found in the path\
3exec wish "$0" "$@"
4# If this does not work, change the #!/usr/bin/wish line below
5# to reflect the actual wish location and delete all preceeding lines
6#
7# (delete here and above)
8#------------------------------------------------------------------------------
9#------------------------------------------------------------------------------
10# load the CIF dictionaries; this forces the creation of dictionary index files
11#------------------------------------------------------------------------------
12#------------------------------------------------------------------------------
13
14package require Tk
15# where is this file running from?
16set script [info script]
17# translate links -- go six levels deep
18foreach i {1 2 3 4 5 6} {
19    if {[file type $script] == "link"} {
20        set link [file readlink $script]
21        if { [file  pathtype  $link] == "absolute" } {
22            set script $link
23        } {
24            set script [file dirname $script]/$link
25        }
26    } else {
27        break
28    }
29}
30# fixup relative paths
31if {[file pathtype $script] == "relative"} {
32    set script [file join [pwd] $script]
33}
34set scriptdir [file dirname $script ]
35
36source [file join $scriptdir browsecif.tcl]
37
38# define a list of dictionary files
39set dictfilelist [glob -nocomplain \
40                      [file join [file dirname $scriptdir] data *.dic]]
41set CIF(dictfilelist) {}
42foreach f $dictfilelist {
43    lappend ::CIF(dictfilelist) $f
44    set ::CIF(dict_$f) 1
45}
46# load the initial CIF dictionaries
47LoadDictIndices
48
49exit
Note: See TracBrowser for help on using the repository browser.