File: SetUp.tcl

package info (click to toggle)
tclcurl 7.22.1-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,932 kB
  • sloc: ansic: 4,479; tcl: 898; sh: 435; makefile: 39
file content (42 lines) | stat: -rwxr-xr-x 1,202 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This script inst`pwd+alls TclCurl in a Windows system, you only
# have to double-click on it and, provided Tcl/Tk is already
# installed, TclCurl will be ready to use.
#
# Copyright (c) 2001-2011 Andres Garcia Garcia.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.


wm withdraw .

set tclLibDir     [file dirname $tcl_library]
set tclBinDir     [file join [file dirname $tclLibDir] bin]
set windowsSystem [file join $env(windir) SYSTEM]

cd [file dirname [info script]]

foreach oldie [glob -nocomplain $tclLibDir/tclcurl*] {
    catch {file delete -force $oldie}
}

file copy -force tclcurl7.22.0 $tclLibDir

foreach sslFile [glob -nocomplain ssl/*] {
    catch {file copy -force $sslFile $windowsSystem}
}
foreach sslFile [glob -nocomplain certs/*] {
    file copy -force $sslFile [file join $env(windir) cacert.pem]
}

package forget TclCurl

if {[catch {package require TclCurl} version]} {
    tk_messageBox -icon error -type ok -title Error \
        -message "Install failed\n$version"
} else {
    tk_messageBox -icon info -type ok -title Installed \
        -message "Version $version installed"
}

exit