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

Re: when using --prefix tag



Phil Conan wrote:
Hello.

is there any way to determine whether a user has used the --prefix tag.
What I want to do is sed a file with the prefix information if the user
choses to relocate the package.

this is using redhat 7.3 and rpm 4.0.4

thanks,
Phil

Are you refering to in a post (pre) install script? Or after the user has installed?


If you are refering to a post install script, this little scriptlet might be what you need:

if [ "${RPM_INSTALL_PREFIX}" = "%{prefix}" ] ; then
  # User has not use --prefix
else
  # User has used prefix
fi

(or you can just always use RPM_INSTALL_PREFIX if you are doing something like setting up configuration files.)

--Mark




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