mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-18 04:40:59 +00:00
scripts/mkits.sh: fix portability issue
BSD wc can output more whitespaces, which breaks the cut usage. Replace the cut invocation with awk, which is more portable. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
94d0cb9d2e
commit
b8bf27e4cb
@ -89,7 +89,7 @@ if [ -n "${COMPATIBLE}" ]; then
|
||||
fi
|
||||
|
||||
[ "$DTOVERLAY" ] && {
|
||||
dtbsize=$(wc -c "$DTB" | cut -d' ' -f1)
|
||||
dtbsize=$(wc -c "$DTB" | awk '{print $1}')
|
||||
DTADDR=$(printf "0x%08x" $(($LOAD_ADDR - $dtbsize)) )
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ OVCONFIGS=""
|
||||
overlay_blob=${overlay##*:}
|
||||
ovname=${overlay%%:*}
|
||||
ovnode="fdt-$ovname"
|
||||
ovsize=$(wc -c "$overlay_blob" | cut -d' ' -f1)
|
||||
ovsize=$(wc -c "$overlay_blob" | awk '{print $1}')
|
||||
echo "$ovname ($overlay_blob) : $ovsize" >&2
|
||||
DTADDR=$(printf "0x%08x" $(($DTADDR - $ovsize)))
|
||||
FDTOVERLAY_NODE="$FDTOVERLAY_NODE
|
||||
|
Loading…
Reference in New Issue
Block a user