Re: Question about Post Installation processes

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

 



On Thu, Dec 04, 2003 at 06:19:05PM -0800, Baz wrote:
> All,
> 
> I am trying to sed a file in the post install process. I have used the
> %{prefix} for the --prefix during rpm installation. However, it does not
> seem to work when using this %{prefix} during any codes under %post section.
> 
> Please help. Please detail the answers and possible code samples.

You can use RPM_INSTALL_PREFIX in your %post section 

eg:

%post
if [ -z "$RPM_INSTALL_PREFIX" ]; then
  RPM_INSTALL_PREFIX=%{prefix}
fi

sed -e "s#@prefix@#$RPM_INSTALL_PREFIX#" ...

Paul


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux