#!/bin/env tclsh
set version 0.0.1
set boot_dir [pwd]
cd [file dirname [dict get [info frame [info frame]] file]]
puts "boot_dir=$boot_dir"
puts "pwd=[pwd]"
source persist.tcl
source deps.tcl
source util.tcl
set log [logger::init tclircc::main]
source db.tcl
db::init_core $data_dir
source db/networks.tcl
source history.tcl
hist::open hist_db [file join $data_dir foo.db]
hist::ensure hist_db #foo
# cleanup every 6 hours, should be heuristic-driven eventually
db::autocleanup [expr {6 * 60 * 60 * 1000}]
source ui.tcl
wm withdraw .
toplevel .mainwin
ui::basic::setup .mainwin