[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
shell script and rpm
- From: "Phil Conan" <philconan hotmail com>
- To: Rpm-list redhat com
- Subject: shell script and rpm
- Date: Tue, 02 Sep 2003 20:21:27 +0000
Hi,
I am getting an error when using shell script within my rpm.
here is the script that fails within the rpm but works perfectly well
outside of the rpm:
if [ "${RPM_INSTALL_PREFIX}" = "%{prefix}" ] ; then
# User has not used prefix do nothing
echo "the prefix value is: ${RPM_INSTALL_PREFIX}"
else
# User has used prefix
echo "the prefix value is: ${RPM_INSTALL_PREFIX}"
sed -e 's/usr\/local\/dsi\-0\.3/'$RPM_INSTALL_PREFIX'/g' /tmp/dsi_setup.sh
>/home/telorb/dsi_setup.sh
the error after trying to install the rpm:
# rpm -i --prefix=/tmp dsi-0.3-1.i386.rpm
the prefix value is: /tmp
sed: -e expression #1, char 26: Unknown option to 's'
error: execution of %pre scriptlet from dsi-0.3-1 failed, exit status 1
error: install: %pre scriptlet failed (2), skipping dsi-0.3-1
for some reason the rpm doesn`t like the single quote syntax I`m using for
the variable '$RPM_INSTALL_PREFIX' when the sed is performed. any solutions?
this is rpm version 4.0.4 on RH7.3
thanks in advance,
Phil
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]