]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - checkAutoPath.tcl
releasing package tclcurl version 7.22.0+hg20160822-2
[sven/tclcurl.git] / checkAutoPath.tcl
1 # This file checks that the directory where TclCurl is going to be
2 # installed is actually in the auto_path variable, if it isn't it 
3 # modifies 'init.tcl'.
4
5 set tclCurlDir  [lindex $argv 0]
6 set initTclDir  [lindex $argv 1]
7 set initFile    [file join $tcl_library init.tcl]
8 if {[file writable $initFile]==0} exit
9
10
11 if {[lsearch $auto_path $tclCurlDir]==-1} {
12     set handle [open "$initFile" a]
13     puts $handle "\nlappend auto_path $tclCurlDir\n"
14 }
15
16 exit
17