diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-03-20 03:55:00 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2017-04-04 04:21:20 +0200 |
commit | 1af766987f66c63b029578374d679a353960d46d (patch) | |
tree | 334415a0d5609afea5ca3fe191464bd85e841560 /scripts/pkgdelta.sh.in | |
parent | d9908fc1f272a2859b525c3bd92d9f3e8a2a6293 (diff) | |
download | pacman-1af766987f66c63b029578374d679a353960d46d.tar.gz pacman-1af766987f66c63b029578374d679a353960d46d.tar.xz |
Replace @SIZECMD@ with POSIX-compatible command
Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX
commands and removes the need for any platform-specific usages.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/pkgdelta.sh.in')
-rw-r--r-- | scripts/pkgdelta.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in index 9f87185b..4500dd75 100644 --- a/scripts/pkgdelta.sh.in +++ b/scripts/pkgdelta.sh.in @@ -119,7 +119,7 @@ create_xdelta() newver="$pkgver" newarch="$arch" - pkgsize="$(@SIZECMD@ -L "$newfile")" + pkgsize="$(wc -c "$newfile" | cut -d' ' -f1)" if ((pkgsize < min_pkg_size)); then msg "$(gettext "Skipping delta creation for small package: %s - size %s")" "$newname" "$pkgsize" @@ -151,7 +151,7 @@ create_xdelta() return 1 fi - deltasize="$(@SIZECMD@ -L "$deltafile")" + deltasize="$(wc -c "$deltafile" | cut -d' ' -f1)" if ((max_delta_size * pkgsize / 100 < deltasize)); then msg "$(gettext "Delta package larger than maximum size. Removing.")" |