[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Setting value of a %define to some $var



So sprach »Jim Knoble« am 2001-12-10 um 18:35:28 -0500 :
> for example:
> 
>   %define my_macro %(echo ${MY_VARIABLE})

Yes, I've tried this.  However, %my_macro ended up being empty.  I want
to do this, because I want to pass values from the %install part to the
%post part.  So MY_VAR is not set at the beginning of the rpm run, but
%is set during %install.

> To use your 'for...do' example above:
> 
>   %{expand:%%define def %(for i in 1 2 3; do echo "${i}"; done)}

Hmm...

I've put this exactly in my spec (in the %prep section), and get this
error message:

+ 2
/home/askwar/rpm/tmp/rpm-tmp.6969: 2: command not found

So this doesn't seem to work :(

Alexander Skwar
-- 
How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:	http://www.iso-top.de      |     Jabber: askwar@charente.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 3 days 11 hours 45 minutes





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []