1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00
sqlite/tool/mkamalzip.tcl
drh 35ac4c8685 Update the makefile so that it puts the amalgamation files in a subdirectory
in the amalgamation-zip.
[forum:/forumpost/b8dd1941e1|Forum post b8dd1941e1].

FossilOrigin-Name: cef8e88bedf01dc47012ef1cb878b22117c9966e615edf5a69704486f9cfa56c
2025-01-09 19:57:44 +00:00

24 lines
625 B
Tcl

#!/usr/bin/tclsh
#
# Build a ZIP archive for the amalgamation source code found in the current
# directory.
#
set VERSION-file [file dirname [file dirname [file normalize $argv0]]]/VERSION
set fd [open ${VERSION-file} rb]
set vers [read $fd]
close $fd
scan $vers %d.%d.%d major minor patch
set numvers [format {3%02d%02d00} $minor $patch]
set dir sqlite-amalgamation-$numvers
file delete -force $dir
file mkdir $dir
set filelist {sqlite3.c sqlite3.h shell.c sqlite3ext.h}
foreach f $filelist {
file copy $f $dir/$f
}
set cmd "zip -r $dir.zip $dir"
puts $cmd
file delete -force $dir.zip
exec {*}$cmd
file delete -force $dir