summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in2
-rw-r--r--scripts/repo-add.sh.in4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 273bc0ab..9587756a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -779,7 +779,7 @@ create_package() {
else
local packager="Unknown Packager"
fi
- local size=$(du -sb | awk '{print $1}')
+ local size=$(du -sk | awk '{print $1 * 1024}')
# write the .PKGINFO file
msg2 "$(gettext "Generating .PKGINFO file...")"
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 21031547..e90f0e89 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -118,7 +118,7 @@ db_write_delta()
# get md5sum and size of delta
md5sum="$(md5sum "$deltafile" | cut -d ' ' -f 1)"
- csize=$(du -b -L "$deltafile" | cut -f 1)
+ csize=$(du -kL "$deltafile" | awk '{print $1 * 1024}')
# ensure variables were found
if [ -z "$pkgname" -o -z "$fromver" -o -z "$tover" -o -z "$arch" ]; then
@@ -165,7 +165,7 @@ db_write_entry()
IFS=$OLDIFS
# get compressed size of package
- csize=$(du -b -L "$pkgfile" | cut -f 1)
+ csize=$(du -kL "$pkgfile" | awk '{print $1 * 1024}')
startdir=$(pwd)
pushd "$gstmpdir" 2>&1 >/dev/null