Changeset 4481 for trunk/base
- Timestamp:
- Jan 6, 2004, 9:47:33 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portfetch.tcl
r4470 r4481 71 71 72 72 # Option-executed procedures 73 namespace eval options { } 74 proc options::use_bzip2 {args} { 75 global use_bzip2 extract.suffix 76 if {[tbool use_bzip2]} { 77 set extract.suffix .tar.bz2 78 } 79 } 80 81 proc options::use_zip {args} { 82 global use_zip extract.suffix 83 if {[tbool use_zip]} { 84 set extract.suffix .zip 73 option_proc use_bzip2 fix_extract_suffix 74 option_proc use_zip fix_extract_suffix 75 76 proc fix_extract_suffix {option action args} { 77 global extract.suffix 78 if {[string equal ${action} "set"] && [tbool args]} { 79 switch $option { 80 use_bzip2 { 81 set extract.suffix .tar.bz2 82 } 83 use_zip { 84 set extract.suffix .zip 85 } 86 } 85 87 } 86 88 } … … 94 96 # Given a distname, return a suffix based on the use_zip / use_bzip2 / extract.suffix options 95 97 proc suffix {distname} { 96 global extract.suffix use_bzip2 use_zipfetch.type98 global extract.suffix fetch.type 97 99 if {"${fetch.type}" == "cvs"} { 98 100 return "" 99 101 } 100 if {[tbool use_bzip2]} { 101 return ${distname}.tar.bz2 102 } elseif {[tbool use_zip]} { 103 return ${distname}.zip 104 } else { 105 return ${distname}${extract.suffix} 106 } 102 return ${distname}${extract.suffix} 107 103 } 108 104
Note: See TracChangeset
for help on using the changeset viewer.