disable the egl demos.
[AROS-Contrib.git] / sqlite3 / tclinstaller.tcl
blob88b7df1c0ffc7a7791a1560522ef245b6ea207a8
1 # This script attempts to install SQLite3 so that it can be used
2 # by TCL. Invoke this script with single argument which is the
3 # version number of SQLite. Example:
5 # tclsh tclinstaller.tcl 3.0
7 set VERSION [lindex $argv 0]
8 set LIBFILE .libs/libtclsqlite3[info sharedlibextension]
9 if { ![info exists env(DESTDIR)] } { set env(DESTDIR) "" }
10 set LIBDIR $env(DESTDIR)[lindex $auto_path 0]
11 set LIBNAME [file tail $LIBFILE]
12 set LIB $LIBDIR/sqlite3/$LIBNAME
14 file delete -force $LIBDIR/sqlite3
15 file mkdir $LIBDIR/sqlite3
16 set fd [open $LIBDIR/sqlite3/pkgIndex.tcl w]
17 puts $fd "package ifneeded sqlite3 $VERSION \[list load $LIB sqlite3\]"
18 close $fd
20 # We cannot use [file copy] because that will just make a copy of
21 # a symbolic link. We have to open and copy the file for ourselves.
23 set in [open $LIBFILE]
24 fconfigure $in -translation binary
25 set out [open $LIB w]
26 fconfigure $out -translation binary
27 puts -nonewline $out [read $in]
28 close $in
29 close $out