From 3c092a42ec94a91fdba25ea036fd6dd0e6c1b6bf Mon Sep 17 00:00:00 2001 From: Benjamin Schieder Date: Fri, 25 Nov 2005 17:20:26 +0000 Subject: [PATCH] Benjamin Schieder: use postinstall.sh.$xpkg if exist and postinstall.sh otherwise [2005101310203927182] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6632 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/functions | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/functions b/scripts/functions index e40ffde0f..7a3a7a1ed 100644 --- a/scripts/functions +++ b/scripts/functions @@ -753,7 +753,17 @@ build_this_package() { $root/usr/share/applications/`basename $file` done - if [ -f $confdir/postinstall.sh ] ; then + if [ -f $confdir/postinstall.sh.$xpkg ] ; then + echo "Installing postinstall file $confdir/postinstall.sh.$xpkg" + mkdir -p $root/etc/postinstall + + rock_substitute $confdir/postinstall.sh.$xpkg > \ + $root/etc/postinstall/$xpkg-postinstall.sh + elif [ -f $confdir/postinstall.sh -a "$pkg" != "$xpkg" ] ; then + echo_error "forked package $xpkg from $pkg" + echo_error "but only found a 'postinstall.sh'" + echo_error "please create a 'postinstall.sh.$xpkg'" + elif [ -f $confdir/postinstall.sh ] ; then echo "Installing postinstall file $confdir/postinstall.sh" mkdir -p $root/etc/postinstall