summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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