Hex Artifact Content

Artifact 91f3c57960f7f21bfa359310f1967f4c75c109be:


0000: 23 21 20 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20  #! /usr/bin/env 
0010: 74 63 6c 73 68 0a 0a 69 66 20 7b 5b 63 61 74 63  tclsh..if {[catc
0020: 68 20 7b 0a 09 73 65 74 20 62 75 69 6c 64 66 6c  h {..set buildfl
0030: 61 67 73 20 5b 73 70 6c 69 74 20 5b 6c 69 6e 64  ags [split [lind
0040: 65 78 20 24 61 72 67 76 20 31 5d 20 2d 5d 0a 0a  ex $argv 1] -]..
0050: 09 23 20 44 65 74 65 72 6d 69 6e 65 20 69 66 20  .# Determine if 
0060: 49 74 63 6c 20 77 61 73 20 77 61 73 20 72 65 71  Itcl was was req
0070: 75 65 73 74 65 64 0a 09 23 23 20 4d 69 6e 69 6d  uested..## Minim
0080: 61 6c 20 62 75 69 6c 64 73 20 64 6f 6e 27 74 20  al builds don't 
0090: 63 6f 6d 65 20 77 69 74 68 20 49 74 63 6c 0a 09  come with Itcl..
00a0: 73 65 74 20 68 61 73 69 74 63 6c 20 31 0a 09 69  set hasitcl 1..i
00b0: 66 20 7b 5b 6c 73 65 61 72 63 68 20 2d 65 78 61  f {[lsearch -exa
00c0: 63 74 20 24 62 75 69 6c 64 66 6c 61 67 73 20 22  ct $buildflags "
00d0: 6d 69 6e 22 5d 20 21 3d 20 2d 31 7d 20 7b 0a 09  min"] != -1} {..
00e0: 09 73 65 74 20 68 61 73 69 74 63 6c 20 30 0a 09  .set hasitcl 0..
00f0: 7d 0a 0a 09 69 66 20 7b 21 24 68 61 73 69 74 63  }...if {!$hasitc
0100: 6c 7d 20 7b 0a 09 09 65 78 69 74 20 30 0a 09 7d  l} {...exit 0..}
0110: 0a 0a 09 70 61 63 6b 61 67 65 20 72 65 71 75 69  ...package requi
0120: 72 65 20 49 74 63 6c 0a 0a 09 65 78 69 74 20 30  re Itcl...exit 0
0130: 0a 7d 5d 7d 20 7b 0a 09 70 75 74 73 20 22 45 72  .}]} {..puts "Er
0140: 72 6f 72 20 69 6e 20 49 74 63 6c 20 54 65 73 74  ror in Itcl Test
0150: 3a 20 24 65 72 72 6f 72 49 6e 66 6f 22 0a 09 65  : $errorInfo"..e
0160: 78 69 74 20 31 0a 7d 0a                          xit 1.}.