Skip to content

Commit

Permalink
Fix incorrect package size calculation
Browse files Browse the repository at this point in the history
The du command prints the size and then the full path and if the full path
contains numbers, the tr command adds them to the size.
Therefore it is better to use awk.
  • Loading branch information
u-235 committed Oct 11, 2024
1 parent 03e53eb commit 5fd7327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install/deb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Depends: $PACKAGE_DEPENDS
Architecture: $PACKAGE_ARCH
Maintainer: Nick Egorrov <nicegorov@yandex.ru>
Description: $PACKAGE_DEBIAN_DESCRIPTION
Installed-Size: $(du -s "$PACKAGE_DIR" | tr -cd 0-9)
Installed-Size: $(du -s "$PACKAGE_DIR" | awk '{print $1}')
EOF

if [ -f "${PACKAGE_FULL_NAME}.deb" ]; then
Expand Down

0 comments on commit 5fd7327

Please sign in to comment.