From 282eeadc68fec1da8651d0c65ad0dfebd11a9c7f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 19 Aug 2008 23:29:56 -0500 Subject: Factor shell script size command into configure script Commit 149839c5391e9a93 introduced a small behavior regression as a drawback for a better portability. repo-add now includes the approximate size (to the nearest KB) rather than an exact size due to the switching of the du command to a more portable form. Instead of sacrificing the exact size, use configure to help us determine a valid command to acquire our filesize and place it in the sync database. Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/repo-add.sh.in') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 538976d7..f3a3a4f4 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -122,7 +122,7 @@ db_write_delta() # get md5sum and size of delta md5sum="$(md5sum "$deltafile" | cut -d ' ' -f 1)" - csize=$(du -kL "$deltafile" | awk '{print $1 * 1024}') + csize=$(@SIZECMD@ "$deltafile") # ensure variables were found if [ -z "$pkgname" -o -z "$fromver" -o -z "$tover" -o -z "$arch" ]; then @@ -170,7 +170,7 @@ db_write_entry() IFS=$OLDIFS # get compressed size of package - csize=$(du -kL "$pkgfile" | awk '{print $1 * 1024}') + csize=$(@SIZECMD@ "$pkgfile") startdir=$(pwd) pushd "$gstmpdir" 2>&1 >/dev/null -- cgit v1.2.3