From d8c7607a611432cf4314b3d9d9c1b45dd230e4df Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 04 Jul 2013 13:46:29 -0400 Subject: bootstrap-prepare.sh: Patch before packing source. --- 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 -- cgit v0.9.1