From 5fd7327e3da1b4e4a99f990ff0e8fe73c6abee65 Mon Sep 17 00:00:00 2001 From: u-235 Date: Fri, 11 Oct 2024 14:55:49 +0300 Subject: [PATCH] Fix incorrect package size calculation 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. --- install/deb-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/deb-build.sh b/install/deb-build.sh index f0b5e52..7876a48 100755 --- a/install/deb-build.sh +++ b/install/deb-build.sh @@ -227,7 +227,7 @@ Depends: $PACKAGE_DEPENDS Architecture: $PACKAGE_ARCH Maintainer: Nick Egorrov 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