source: trunk/base/src/port1.0/portclean.tcl @ 301

Last change on this file since 301 was 301, checked in by landonf (Landon Fuller), 18 years ago

Add support for 'clean' target

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 533 bytes
RevLine 
[301]1# ex:ts=4
2#
3# Insert some license text here at some point soon.
4#
5
6# the 'clean' target is provided by this package
7
8package provide portclean 1.0
9package require portutil 1.0
10
11register com.apple.clean target clean_main clean_init always
12register com.apple.clean provides clean
13register com.apple.clean requires main
14
15proc clean_init {args} {
16    return 0
17}
18
19proc clean_main {args} {
20    global portpath workdir
21    if {[ui_yesno "Delete ${portpath}/${workdir}? "]} {
22        system "rm -rf \"${portpath}/${workdir}\""
23    }
24    return 0
25}
Note: See TracBrowser for help on using the repository browser.