-
Notifications
You must be signed in to change notification settings - Fork 0
/
special.tcl
41 lines (32 loc) · 1.17 KB
/
special.tcl
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
# -*- tcl -*- Copyright (c) 2012-2024 Andreas Kupries
# # ## ### ##### ######## ############# #####################
## Special commands outside of goal processing.
# # ## ### ##### ######## ############# #####################
## Export (internals - recipe definitions, other utilities)
namespace eval ::kettle::special {
namespace export {[a-z]*}
namespace ensemble create
# Import the supporting utilities used here.
namespace import ::kettle::path
}
# # ## ### ##### ######## ############# #####################
## API
proc ::kettle::special::setup {args} {
# Generate a basic build.tcl file in the current working
# directory.
if {![llength $args]} {
lappend args tcl
}
lappend lines "#!/usr/bin/env kettle"
lappend lines "# -*- tcl -*-"
lappend lines "# For kettle sources, documentation, etc. see"
lappend lines "# - http://core.tcl.tk/akupries/kettle"
lappend lines "# - http://chiselapp.com/user/andreas_kupries/repository/Kettle"
foreach code $args {
lappend lines [list kettle {*}$code]
}
path write build.tcl [join $lines \n]\n
return
}
# # ## ### ##### ######## ############# #####################
return