Author: jfrederic.clere(a)jboss.com
Date: 2013-06-11 09:29:53 -0400 (Tue, 11 Jun 2013)
New Revision: 3093
Modified:
trunk/build/unix/util/applypatch.sh
Log:
Arrange the patch applier script.
Modified: trunk/build/unix/util/applypatch.sh
===================================================================
--- trunk/build/unix/util/applypatch.sh 2013-06-11 11:43:40 UTC (rev 3092)
+++ trunk/build/unix/util/applypatch.sh 2013-06-11 13:29:53 UTC (rev 3093)
@@ -41,20 +41,24 @@
xb_applypatch()
{
basefilename=`basename $xbap_package_dir`
- if [ -f $xbap_build_top/../patch/$basefilename.patch ]; then
+ filename=$basefilename.patch
+ if $xbap_is_rhel; then
+ filename=$basefilename.rhel.patch
+ else
+ if [ $BUILD_SYS = "linux2" ]; then
+ dist=`lsb_release -i -s`
+ ver=`lsb_release -r -s`
+ if [ -f $xbap_build_top/../patch/$basefilename.$dist.$ver.patch ]; then
+ filename=$basefilename.$dist.$ver.patch
+ fi
+ fi
+ fi
+ if [ -f $xbap_build_top/../patch/$filename ]; then
(cd $xbap_package_dir
- echo "Applying patch $ap_build_top/../patch/$basefilename.patch in
$xbap_package_dir"
- $patch -tf -p0 -i $xbap_build_top/../patch/$basefilename.patch
+ echo "Applying patch $ap_build_top/../patch/$filename in
$xbap_package_dir"
+ $patch -tf -p0 -i $xbap_build_top/../patch/$filename
) || return 1
fi
- if $xbap_is_rhel; then
- if [ -f $xbap_build_top/../patch/$basefilename.rhel.patch ]; then
- (cd $xbap_package_dir
- echo "Applying rhel patch $ap_build_top/../patch/$basefilename.rhel.patch in
$xbap_package_dir"
- $patch -tf -p0 -i $xbap_build_top/../patch/$basefilename.rhel.patch
- ) || return 1
- fi
- fi
}
# Apply patch for the component
Show replies by date