Skip to content
Permalink
Browse files

When appending, verify that variable exists, otherwise, set variable

to supplied value

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@956 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
landonf committed Oct 5, 2002
1 parent 237ea8b commit adf1f05d844972eeb660ceac70dd58a2e3caf77c
Showing with 10 additions and 6 deletions.
  1. +10 −6 src/port1.0/portutil.tcl
@@ -81,12 +81,16 @@ proc options {args} {
eval "proc ${option}-append {args} \{ \n\
global ${option} user_options \n\
\if \{!\[info exists user_options(${option})\]\} \{ \n\
set $option \[concat \$\{$option\} \$args\] \n\
if \{\[info exists option_procs($option)\]\} \{ \n\
foreach p \$option_procs($option) \{ \n\
eval \"\$p $option append \$args\" \n\
\} \n\
\} \n\
if \{\[info exists ${option}\]\} \{ \n\
set ${option} \[concat \$\{$option\} \$args\] \n\
\} else \{ \n\
set ${option} \$args \n\
\} \n\
if \{\[info exists option_procs($option)\]\} \{ \n\
foreach p \$option_procs($option) \{ \n\
eval \"\$p $option append \$args\" \n\
\} \n\
\} \n\
\} \n\
\}"
}

0 comments on commit adf1f05

Please sign in to comment.
You can’t perform that action at this time.