[Zrouter-src] ZRouter.org: push to ZRouter share/mk/converters/sync.mk

zrouter-src at zrouter.org zrouter-src at zrouter.org
Fri Dec 9 15:25:04 UTC 2011


details:   http://zrouter.org/hg/zrouter//rev/264aec490886
changeset: 255:264aec490886
user:      ray at terran.dlink.ua
date:      Fri Dec 09 16:24:12 2011 +0200
description:
old /bin/sh does not allow variables without $$ in $$(()) math

diffstat:

 share/mk/converters/sync.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r 1df90b4e4716 -r 264aec490886 share/mk/converters/sync.mk
--- a/share/mk/converters/sync.mk	Fri Dec 09 02:02:06 2011 +0200
+++ b/share/mk/converters/sync.mk	Fri Dec 09 16:24:12 2011 +0200
@@ -13,12 +13,12 @@
 	echo "PACKING_KERNEL_ROUND=\"${PACKING_KERNEL_ROUND}\" FLASH_BLOCK_SIZE=\"${FLASH_BLOCK_SIZE}\"" ; \
 	BS_MASK=$$(( ${PACKING_KERNEL_ROUND} - 1 ))					; \
 	echo BS_MASK=$${BS_MASK} ; \
-	BS_MASK_INV=$$(( ~BS_MASK ))							; \
+	BS_MASK_INV=$$(( ~$${BS_MASK} ))						; \
 	echo BS_MASK_INV=$${BS_MASK_INV} ; \
 	CONVERT_SYNC_OLD_SIZE=`stat -f %z "${CONVERT_FROM_SYNC}"`			; \
-	_NEW_SIZE_W_HDR=$$(( CONVERT_SYNC_OLD_SIZE + ${IMAGE_HEADER_EXTRA} ))		; \
+	_NEW_SIZE_W_HDR=$$(( $${CONVERT_SYNC_OLD_SIZE} + ${IMAGE_HEADER_EXTRA} ))		; \
 	echo _NEW_SIZE_W_HDR=$${_NEW_SIZE_W_HDR} ; \
-	CONVERT_SYNC_NEW_SIZE=$$(( ((_NEW_SIZE_W_HDR + BS_MASK ) & BS_MASK_INV) - ${IMAGE_HEADER_EXTRA} )); \
+	CONVERT_SYNC_NEW_SIZE=$$(( (($${_NEW_SIZE_W_HDR} + $${BS_MASK} ) & $${BS_MASK_INV}) - ${IMAGE_HEADER_EXTRA} )); \
 	cp "${CONVERT_FROM_SYNC}" "${CONVERT_TO_SYNC}"					; \
 	echo "Old size $${CONVERT_SYNC_OLD_SIZE} New size $${CONVERT_SYNC_NEW_SIZE}"	; \
 	truncate -s $${CONVERT_SYNC_NEW_SIZE} "${CONVERT_TO_SYNC}"


More information about the Zrouter-src mailing list