Tcl Source Code

Hex Artifact Content
Login

Artifact f18cb4b4b582adc83102e085f9b2713e05b4ce205967a60eb7f9de80b1497393:


0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 74  #!/usr/bin/env t
0010: 63 6c 73 68 0a 69 66 20 7b 24 61 72 67 63 20 3c  clsh.if {$argc <
0020: 20 31 7d 20 7b 0a 20 20 20 20 65 72 72 6f 72 20   1} {.    error 
0030: 22 6e 65 65 64 20 61 20 66 69 6c 65 6e 61 6d 65  "need a filename
0040: 20 61 72 67 75 6d 65 6e 74 22 0a 7d 0a 6c 61 73   argument".}.las
0050: 73 69 67 6e 20 24 61 72 67 76 20 66 69 6c 65 6e  sign $argv filen
0060: 61 6d 65 0a 73 65 74 20 66 20 5b 6f 70 65 6e 20  ame.set f [open 
0070: 24 66 69 6c 65 6e 61 6d 65 20 61 5d 0a 70 75 74  $filename a].put
0080: 73 20 24 66 20 22 54 43 4c 5f 56 45 52 53 49 4f  s $f "TCL_VERSIO
0090: 4e 3d 5b 69 6e 66 6f 20 74 63 6c 76 65 72 73 69  N=[info tclversi
00a0: 6f 6e 5d 22 0a 70 75 74 73 20 24 66 20 22 54 43  on]".puts $f "TC
00b0: 4c 5f 50 41 54 43 48 4c 45 56 45 4c 3d 5b 69 6e  L_PATCHLEVEL=[in
00c0: 66 6f 20 70 61 74 63 68 6c 65 76 65 6c 5d 22 0a  fo patchlevel]".
00d0: 63 6c 6f 73 65 20 24 66 0a                       close $f.