From 114da341d0712b0013d4c98a5e9f6c0538da1766 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Mon, 18 Aug 2003 16:43:19 +0000 Subject: [PATCH] factored out a apply_patchfiles funtion to save some duplicaton in the package configuration git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1108 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/functions | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/functions b/scripts/functions index ccf589ad6..60267a3ec 100644 --- a/scripts/functions +++ b/scripts/functions @@ -406,6 +406,15 @@ register_badfiles() { done } +# Apply the given $patchfiles +# +apply_patchfiles() { + for x in $patchfiles; do + echo "Apply patch $x ..." + eval "patch $patchopt < $x" + done +} + # Main program for building a package # build_this_package() { @@ -456,10 +465,7 @@ build_this_package() { # if [ $autopatch = 1 ]; then hook_eval prepatch - for x in $patchfiles; do - echo "Apply patch $x ..." - eval "patch $patchopt < $x" - done + apply_patchfiles hook_eval postpatch fi