Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/tool/mkamalzip.tcl # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / tool / mkamalzip.tcl` 23 lines ยท 625 bytes Raw Blame History 1 #!/usr/bin/tclsh 2 # 3 # Build a ZIP archive for the amalgamation source code found in the current 4 # directory. 5 # 6 set VERSION-file [file dirname [file dirname [file normalize $argv0]]]/VERSION 7 set fd [open ${VERSION-file} rb] 8 set vers [read $fd] 9 close $fd 10 scan $vers %d.%d.%d major minor patch 11 set numvers [format {3%02d%02d00} $minor $patch] 12 set dir sqlite-amalgamation-$numvers 13 file delete -force $dir 14 file mkdir $dir 15 set filelist {sqlite3.c sqlite3.h shell.c sqlite3ext.h} 16 foreach f $filelist { 17 file copy $f $dir/$f 18 } 19 set cmd "zip -r $dir.zip $dir" 20 puts $cmd 21 file delete -force $dir.zip 22 exec {*}$cmd 23 file delete -force $dir