Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion makeself-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ MS_dd_Progress()
blocks=\`expr \$length / \$bsize\`
bytes=\`expr \$length % \$bsize\`
(
dd ibs=\$offset skip=1 count=1 2>/dev/null
dd bs=\$offset skip=1 count=1 2>/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Replacing ibs= with bs= is a good move for portability with BusyBox. However, the current command has a bug: 2>/dev/null only redirects stderr, so the stdout of this dd call is prepended to the archive stream, likely causing the checksum errors you mentioned. Additionally, using skip=1 with count=1 reads two blocks (skipping one, reading one), which is unnecessary if the goal is just to skip the header. It is more reliable and correct to simply read and discard the header block.

Suggested change
dd bs=\$offset skip=1 count=1 2>/dev/null
dd bs=\$offset count=1 >/dev/null 2>&1

pos=\`expr \$pos \+ \$bsize\`
MS_Printf " 0%% " 1>&2
if test \$blocks -gt 0; then
Expand Down