summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-07-04 13:46:29 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-07-04 13:46:29 (EDT)
commitd8c7607a611432cf4314b3d9d9c1b45dd230e4df (patch)
tree66530385e1c5e2b088b38f89fff2e415f8f869af
parent750def686c4842e1b6909ed1a83c6421c7553398 (diff)
bootstrap-prepare.sh: Patch before packing source.
-rwxr-xr-xbootstrap-prepare.sh29
1 files changed, 8 insertions, 21 deletions
diff --git a/bootstrap-prepare.sh b/bootstrap-prepare.sh
index c98ca95..8f4e230 100755
--- a/bootstrap-prepare.sh
+++ b/bootstrap-prepare.sh
@@ -37,7 +37,6 @@ main()
prepare_packages_from_git
prepare_packages_from_ftp
- patch_packages
prepare_file_system
}
@@ -57,7 +56,7 @@ log()
prepare_packages_from_git()
{
- local repo
+ local repo patch
[ -d pkg ] || mkdir pkg
cd pkg
@@ -74,6 +73,13 @@ prepare_packages_from_git()
fi
cd "${repo##*/}"
git pull origin master
+ if [ -d "${SCRIPT_DIR}/patches/${repo##*/}" ]; then
+ printf 'Patching package %s...\n' "${repo##*/%/}"
+ for patch in "${SCRIPT_DIR}/patches/${repo##*/}/"*; do
+ patch -N -p 1 -u -i "${patch}" || \
+ true
+ done
+ fi
if [ -x config ]; then
./config clean
PKG_TARGETS="${ARCH}" ./config
@@ -113,25 +119,6 @@ prepare_packages_from_ftp()
cd ..
}
-patch_packages()
-{
- local dir patch
-
- cd pkg
-
- for dir in */; do
- if [ -d "${SCRIPT_DIR}/patches/${dir}" ]; then
- log 'Patching package %s...' "${dir%/}"
- for patch in "${SCRIPT_DIR}/patches/${dir}"*; do
- patch -N -p 1 -u -d "${dir}" -i "${patch}" || \
- true
- done
- fi
- done
-
- cd ..
-}
-
prepare_file_system()
{
local ma dir