Lines 427-440
Link Here
|
427 |
} |
427 |
} |
428 |
|
428 |
|
429 |
compile_busybox() { |
429 |
compile_busybox() { |
430 |
|
430 |
# Delete cache if stored config's MD5 does not match one to be used |
431 |
# Delete cache if config is newer |
431 |
if [ -f "${BUSYBOX_BINCACHE}" -a -f "${BUSYBOX_CONFIG}" ] |
432 |
if [ \ |
|
|
433 |
-f "${BUSYBOX_BINCACHE}" -a \ |
434 |
-f "${BUSYBOX_CONFIG}" -a \ |
435 |
"${BUSYBOX_BINCACHE}" -ot "${BUSYBOX_CONFIG}" ] |
436 |
then |
432 |
then |
437 |
rm -rf "${BUSYBOX_BINCACHE}" |
433 |
oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config | md5sum) |
|
|
434 |
newconfig_md5=$(md5sum < "${BUSYBOX_CONFIG}") |
435 |
if [ "${oldconfig_md5}" != "${newconfig_md5}" ] |
436 |
then |
437 |
print_info 1 "busybox: >> Removing stale cache..." |
438 |
rm -rf "${BUSYBOX_BINCACHE}" |
439 |
fi |
438 |
fi |
440 |
fi |
439 |
|
441 |
|
440 |
if [ ! -f "${BUSYBOX_BINCACHE}" ] |
442 |
if [ ! -f "${BUSYBOX_BINCACHE}" ] |
Lines 461-470
Link Here
|
461 |
gen_die 'Busybox executable does not exist!' |
463 |
gen_die 'Busybox executable does not exist!' |
462 |
strip "${TEMP}/${BUSYBOX_DIR}/busybox" || |
464 |
strip "${TEMP}/${BUSYBOX_DIR}/busybox" || |
463 |
gen_die 'Could not strip busybox binary!' |
465 |
gen_die 'Could not strip busybox binary!' |
464 |
bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" || |
466 |
tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config || |
465 |
gen_die 'bzip2 compression of busybox failed!' |
467 |
gen_die 'Could not create the busybox bincache!' |
466 |
mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" || |
|
|
467 |
gen_die 'Could not copy the busybox binary to the package directory, does the directory exist?' |
468 |
|
468 |
|
469 |
cd "${TEMP}" |
469 |
cd "${TEMP}" |
470 |
rm -rf "${BUSYBOX_DIR}" > /dev/null |
470 |
rm -rf "${BUSYBOX_DIR}" > /dev/null |